예제 #1
0
        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);
        }
예제 #2
0
        public async Task Add(RestaurantResponseModel restaurant)
        {
            Restaurant restaurantEntity = this._mapper.Map <RestaurantResponseModel, Restaurant>(restaurant);

            await this._restaurantRepository.Create(restaurantEntity);
        }
예제 #3
0
        public async Task <IActionResult> Update(RestaurantResponseModel restaurant)
        {
            await _restaurantManager.Update(restaurant);

            return(Ok());
        }