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

            await this._restaurantRepository.Create(restaurantEntity);
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> Update(RestaurantResponseModel restaurant)
        {
            await _restaurantManager.Update(restaurant);

            return(Ok());
        }