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)); }
public Task <ICollection <ContextModel> > GetAllTest([PexAssumeUnderTest] ContextService target) { Task <ICollection <ContextModel> > result = target.GetAll(); return(result); }