Ejemplo n.º 1
0
        public void Create(RestaurantCreateModel r)
        {
            Restaurant restaurant = new Restaurant
            {
                Id                 = new Guid(),
                Name               = r.Name,
                Type               = r.Type,
                Address            = r.Address,
                PhoneNumber        = r.PhoneNumber,
                OpeningClosingTime = r.OpeningClosingTime,
                Website            = r.Website,
                Rating             = r.Rating
            };

            _restaurantRepository.Create(restaurant);
            _restaurantRepository.Save();
        }
Ejemplo n.º 2
0
 public IActionResult Create([FromBody] RestaurantCreateModel restaurant)
 {
     _restaurantLogic.Create(restaurant);
     return(Ok());
 }