Пример #1
0
        public ActionResult Details(string userName)
        {
            var chefToView = _chefService.GetChefByUserName(userName);

            if (chefToView == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            var model = Mapper.Map <Chef, ChefDetailsViewModel>(chefToView);

            return(View(model));
        }