public async Task <IActionResult> CreateDiet([FromBody] DietDataJson dietData)
        {
            var diet = await dietService.CreateDiet(dietData);

            if (diet == null)
            {
                return(BadRequest());
            }

            return(Ok(diet));
        }
 public IHttpActionResult AddDiet([FromBody] Models.DietCreate model)
 {
     if (model is null)
     {
         return(BadRequest("Your request body cannot be empty. "));
     }
     if (ModelState.IsValid)
     {
         var created = dietService.CreateDiet(model);
         if (created == true)
         {
             return(Ok("Diet " + model.Name + " has been created. "));
         }
         else
         {
             return(BadRequest("Your diet was not created. Please try again. "));
         }
     }
     return(BadRequest(ModelState));
 }