please help me out.
[Table("tbl_Employee")]
public class Employee
{
[key]
public int EmpID { get; set; }
public string Name { get; set; }
public string Gender { get; set; }
public string City { get; set; }
}
controller class Action Methode
public ViewResult HyperLink()
{
EmployeeDBContext objEmployeeDbContext = new EmployeeDBContext();
List<Employee> Employees = objEmployeeDbContext.Employees.ToList();
return View(Employees);
}
While I am trying to add a Strongly typed view to this Action method I am getting an error like below
" MVCDemo.Models.Employee:: Entity type "Employee" has no key defiened. Define the key for this entity type ."