This commit is contained in:
@@ -424,13 +424,13 @@ namespace AyaNova.Util
|
||||
/// <param name="fileAttachmentToBeDeleted"></param>
|
||||
/// <param name="ct"></param>
|
||||
/// <returns></returns>
|
||||
internal static async Task<FileAttachment> DeleteFileAttachmentAsync(FileAttachment fileAttachmentToBeDeleted, AyContext ct)
|
||||
internal static async Task DeleteFileAttachmentAsync(FileAttachment fileAttachmentToBeDeleted, AyContext ct)
|
||||
{
|
||||
|
||||
//check ref count of file
|
||||
var count = await ct.FileAttachment.LongCountAsync(z => z.StoredFileName == fileAttachmentToBeDeleted.StoredFileName);
|
||||
|
||||
//Store in DB
|
||||
//Remove from the DB
|
||||
ct.FileAttachment.Remove(fileAttachmentToBeDeleted);
|
||||
await ct.SaveChangesAsync();
|
||||
|
||||
@@ -448,7 +448,7 @@ namespace AyaNova.Util
|
||||
}
|
||||
|
||||
//Return AyFileInfo object
|
||||
return fileAttachmentToBeDeleted;
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user