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));
        }
Пример #2
0
        public ActionResult Create([FromBody] ServingViewModel vm)
        {
            var rt  = vm.ToServing();
            var res = _bo.Create(rt);

            return(res.Success ? Ok() : InternalServerError());
        }