Esempio n. 1
0
        // GET: Company/Details/5
        public async Task <ActionResult> Details(int?id)
        {
            if (id == null)
            {
                return(RedirectToAction("NotFound", "Error"));
            }
            var companyDM = await _companyServices.FindCompany(id);

            CompanyViewModel companyVM = new CompanyViewModel();

            AutoMapper.Mapper.Map(companyDM, companyVM);
            if (companyVM == null)
            {
                return(RedirectToAction("NotFound", "Error"));
            }
            return(PartialView("Details", companyVM));
        }