public async Task Update(RestaurantResponseModel restaurant) { Restaurant restaurantEntity = await this._restaurantRepository.FindAsync(x => x.RestaurantId == restaurant.RestaurantId); restaurantEntity.Location = restaurant.Location; restaurant.Name = restaurant.Name; await this._restaurantRepository.Update(restaurantEntity); }
public async Task Add(RestaurantResponseModel restaurant) { Restaurant restaurantEntity = this._mapper.Map <RestaurantResponseModel, Restaurant>(restaurant); await this._restaurantRepository.Create(restaurantEntity); }
public async Task <IActionResult> Update(RestaurantResponseModel restaurant) { await _restaurantManager.Update(restaurant); return(Ok()); }