Ejemplo n.º 1
0
        public IActionResult Get(int id)
        {
            Cms _cms = _cmsRepository.GetSingle(u => u.Id == id, u => u.Fields);

            if (_cms != null)
            {
                CmsViewModel _cmsVM = Mapper.Map <Cms, CmsViewModel>(_cms);
                return(new OkObjectResult(_cmsVM));
            }
            else
            {
                return(NotFound());
            }
        }