예제 #1
0
        public ActionResult Index()
        {
            EmplyeeContext  empc = new EmplyeeContext();
            List <Employee> emp  = empc.Employees.ToList();

            return(View(emp));
        }
예제 #2
0
        // GET: Employee
        public ActionResult Details(int id = 1)
        {
            EmplyeeContext ec = new EmplyeeContext();
            Employee       e  = ec.Employees.Single(x => x.Id == id);

            return(View(e));
        }