public ActionResult Show() { List <Data.Models.Employee> em = employeeDb.GetAll().ToList(); List <Data.Models.Person> pe = personDb.GetAll().ToList(); var model = from e in em join p in pe on e.Id equals p.EmployeeId select new PersonEmployee { FirstName = e.FirstName, LastName = e.LastName, Age = p.Age, PhoneNumber = p.PhoneNumber }; return(View(model)); }
public ActionResult Index() { IEnumerable <Person> model = new List <Person>(); try { model = db.GetAll(); } catch (Exception e) { Log.Fatal(Helper.FATAL_ERROR, e); return(View("Error")); } return(View("Index", model)); }
public ActionResult Index() { var model = db.GetAll(); return(View(model)); }
public List <Person> GetAll() { return(db.GetAll().ToList()); }