public async Task <int> SaveItemAsync(Consumed item) { if (item.Id != 0) { await database.UpdateAsync(item); return(item.Id); } else { return(await database.InsertAsync(item)); } }
public async Task <int> DeleteItemAsync(Consumed item) { return(await database.DeleteAsync(item)); }