public class Employee { [Key] public int EmpID { get; set; } public string FullName { get; set; } public string FatherName { get; set; } public string Gender { get; set; } public DateTime DateOfBirth { get; set; } public string Mobile { get; set; } public String Email { get; set; } public string Address { get; set; } }
public class EmployeeContext:DbContext { public EmployeeContext():base("name=EmployeeContext") { } public DbSet<Employee> Employees { get; set; } }
public ActionResult Employee() { EmployeeContext emp = new EmployeeContext(); List<Employee> emp1= emp.Employees.ToList(); return View(emp1); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)