public async Task UpdateReview(Review reviewItem) { try { dbContext.Update(reviewItem); await dbContext.SaveChangesAsync(); } catch (Exception) { throw new System.Exception($"Did not find review with id{reviewItem.id}"); } }
public async Task UpdatePlace(Place place) { try { //Place toUpdate = await dbContext.Places.FirstAsync(p => p.id == place.id); dbContext.Update(place); //Love EF await dbContext.SaveChangesAsync(); } catch (Exception e) { System.Console.WriteLine($"Did not find place with id{place.id}"); throw new System.Exception(e.Message); } }