Exemple #1
0
        public void WriteData()
        {
            var formNu    = new NuViewModel();
            var nuToWrite = (NU)_nuMapper.Map(formNu, typeof(NuViewModel), typeof(NU));

            unitOfWork.NURepository.Insert(nuToWrite);
        }
Exemple #2
0
        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));
        }