namespace MvcApplication6.Models { [Table("tblEmployee")] public class Employee { public int EmployeeId { get; set; } public string Name { get; set; } public string Gender { get; set; } public string City { get; set; } } } public class EmployeeContext:DbContext { public DbSet<employee>Employees{get;set;} } EmployeeController public ActionResult Details(int id) { EmployeeContext employeeContext = new EmployeeContext(); Employee employees= employeeContext.Employees.Single(emp => emp.EmployeeId == id); return View(employees); } am getting ERROR at id i.e" entity command execution exception was unhandled by user code". i mentioned connection string alsocould you please send me solution... What I have tried: am getting ERROR at id i.e" entity command execution exception was un handled by user code". i mentioned connection string also could you please send me solution...</employee>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)