public ActionResult Index2() { EfRepoContext efRepoContext = new EfRepoContext(); UserRepository userRepository = new UserRepository(efRepoContext); UserBusinessLogic ubl = new UserBusinessLogic(efRepoContext, userRepository); var a = ubl.GetAllUsers(); ViewBag.ContextID = efRepoContext.Id; return(View("Index", a)); }
public IEnumerable <User> GetAllUsers() { var list = _userBusinessLogic.GetAllUsers(); return(list.Select(this.EntityToModel)); }