public ActionResult Create([FromBody] ServingViewModel vm) { var s = vm.ToServing(); var res = _bo.Create(s); return(StatusCode(res.Success ? (int)HttpStatusCode.OK : (int)HttpStatusCode.InternalServerError)); }
public ActionResult Create([FromBody] ServingViewModel vm) { var rt = vm.ToServing(); var res = _bo.Create(rt); return(res.Success ? Ok() : InternalServerError()); }