public void WriteData() { var formNu = new NuViewModel(); var nuToWrite = (NU)_nuMapper.Map(formNu, typeof(NuViewModel), typeof(NU)); unitOfWork.NURepository.Insert(nuToWrite); }
public ActionResult Index() { var nuViewModel = new NuViewModel(); //nuViewModel.IdNUs = 2; var nus = unitOfWork.NURepository.Get(); var nuViewModels = nus.Select(nu => (NuViewModel)_nuMapper.Map(nu, typeof(NU), typeof(NuViewModel))).ToList(); return(View(nuViewModels)); }