public async Task UpdateUser(UserEntity user) { var entry = context.Entry(user); entry.State = EntityState.Modified; await context.SaveChangesAsync(); }
public async Task UpdateVisit(VisitEntity visit) { var entry = context.Entry(visit); entry.State = EntityState.Modified; await context.SaveChangesAsync(); }
public async Task Delete(string id) { var entry = context.Entry(new RestaurantEntity() { Id = id }); entry.State = EntityState.Deleted; try { await context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException error) { log.Error($"{error.Message}"); } }