Пример #1
0
        public ActionResult Edit(long id)
        {
            DatabaseContext dbcontext = new DatabaseContext();
            var employee = dbcontext.Employees.SingleOrDefault(emp => emp.Id == id);

            return View(employee);
        }
Пример #2
0
        //
        // GET: /Employee/
        public ActionResult Index()
        {
            DatabaseContext dbcontext = new DatabaseContext();

            return View(dbcontext.Employees);
        }