Write the following code to delete an entity from the database.
[csharp]
Employee employeeToDelete;
using (var con = new EmployeeDBEntities())
{
employeeToDelete = con.Employee.Where(e => e.Name == "Emp1").FirstOrDefault<Student>();
}
//Create new context
using (var newCon = new EmployeeDBEntities())
{
newCon.Entry(employeeToDelete).State = System.Data.Entity.EntityState.Deleted;
newCon.SaveChanges();
}
[/csharp]