Example #1
0
        public IHttpActionResult Post(DishCreate dish)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }


            if (!dishService.CreateDish(dish))
            {
                return(InternalServerError());
            }


            return(Ok());
        }
 public OperationResult CreateDish(ServiceDataContracts.Dish dish)
 {
     return(dishService.CreateDish(dish));
 }