21 lines
503 B
C#
21 lines
503 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.Mvc;
|
|
using CRUD_OperationsInMVC.Models;
|
|
|
|
namespace CRUD_OperationsInMVC.Controllers
|
|
{
|
|
public class EmployeeController : Controller
|
|
{
|
|
// GET: Employee
|
|
public ActionResult Index()
|
|
{
|
|
EmployeeDBContext dbContext = new EmployeeDBContext();
|
|
List<Employee> empList = dbContext.Employees.ToList();
|
|
|
|
return View(empList);
|
|
}
|
|
}
|
|
} |