public void DeleteFileFromItem <T>(int id, string filename) { var guid = StartMeasurement(); _db.RemoveAttachment(new BufferFileMeta { ParentId = id, Listname = _helpers.GetListName <T>(), AttachmentType = BufferFileMeta.AttachmentTypes.Attachment, Filename = filename }); Queue.AddCommand <T>(new Command { Action = Command.Actions.RemoveAttachmentFromItem, ItemId = id, TableName = _helpers.GetListName <T>(), Parameters = new Dictionary <string, object> { { "Filename", filename } } }); StopMeasurement(guid, "DeleteFileFromItem (LiteDB)"); }
public void DeleteAttachmentFromDbWithoutSyncing(BufferFileMeta meta) { var db = new LiteDb(_helpers, _aweCsomeTable, _connectionString); db.RemoveAttachment(meta); }