Пример #1
0
        public ActionResult Index()
        {
            IEnumerable <Context>   listContext = _contextService.GetAll();
            List <ContextViewModel> viewModel   = new List <ContextViewModel>();

            foreach (var context in listContext)
            {
                var contextVM = new ContextViewModel();
                contextVM.Id   = context.Id;
                contextVM.Name = context.Name;

                viewModel.Add(contextVM);
            }

            return(View(viewModel));
        }
Пример #2
0
        public Task <ICollection <ContextModel> > GetAllTest([PexAssumeUnderTest] ContextService target)
        {
            Task <ICollection <ContextModel> > result = target.GetAll();

            return(result);
        }