public IHttpActionResult GetAUsersDiet(string Id) { if (Id is null) { return(BadRequest("Your request body cannot be empty. ")); } if (ModelState.IsValid) { return(Ok(dietService.GetDietByUserId(Id))); } return(BadRequest(ModelState)); }