注释coverDb.Close()和headerDb.Close()的调用

croire 3 years ago
parent fdba90ff1e
commit 62deb1e40e

@ -90,7 +90,7 @@ namespace DownKyi.Core.Storage
}; };
coverDb.Update(newCover); coverDb.Update(newCover);
coverDb.Close(); //coverDb.Close();
return $"{StorageManager.GetCover()}/{cover.Md5}"; return $"{StorageManager.GetCover()}/{cover.Md5}";
} }
else else
@ -108,12 +108,12 @@ namespace DownKyi.Core.Storage
}; };
coverDb.Update(newCover); coverDb.Update(newCover);
coverDb.Close(); //coverDb.Close();
return $"{StorageManager.GetCover()}/{md5}"; return $"{StorageManager.GetCover()}/{md5}";
} }
else else
{ {
coverDb.Close(); //coverDb.Close();
return null; return null;
} }
} }
@ -133,12 +133,12 @@ namespace DownKyi.Core.Storage
}; };
coverDb.Insert(newCover); coverDb.Insert(newCover);
coverDb.Close(); //coverDb.Close();
return $"{StorageManager.GetCover()}/{md5}"; return $"{StorageManager.GetCover()}/{md5}";
} }
else else
{ {
coverDb.Close(); //coverDb.Close();
return null; return null;
} }
} }

@ -73,7 +73,7 @@ namespace DownKyi.Core.Storage
Md5 = header.Md5 Md5 = header.Md5
}; };
headerDb.Update(newHeader); headerDb.Update(newHeader);
headerDb.Close(); //headerDb.Close();
return $"{StorageManager.GetHeader()}/{header.Md5}"; return $"{StorageManager.GetHeader()}/{header.Md5}";
} }
else else
@ -89,12 +89,12 @@ namespace DownKyi.Core.Storage
Md5 = md5 Md5 = md5
}; };
headerDb.Insert(newHeader); headerDb.Insert(newHeader);
headerDb.Close(); //headerDb.Close();
return $"{StorageManager.GetHeader()}/{md5}"; return $"{StorageManager.GetHeader()}/{md5}";
} }
else else
{ {
headerDb.Close(); //headerDb.Close();
return null; return null;
} }
} }
@ -112,12 +112,12 @@ namespace DownKyi.Core.Storage
Md5 = md5 Md5 = md5
}; };
headerDb.Insert(newHeader); headerDb.Insert(newHeader);
headerDb.Close(); //headerDb.Close();
return $"{StorageManager.GetHeader()}/{md5}"; return $"{StorageManager.GetHeader()}/{md5}";
} }
else else
{ {
headerDb.Close(); //headerDb.Close();
return null; return null;
} }
} }

Loading…
Cancel
Save