It may be because your personal identity ID(key) is missing. Check the value by putting a break point.
For more information, check
this[
^] thread
EDIT:
public ActionResult About()
{
return View();
}
[HttpPost]
public ActionResult About(Employee model)
{
using (personalEntities db = new personalEntities())
{
var delete = (from s in db.checkeddetails where model.searchByName == s.textname select s.empid).FirstOrDefault();
db.checkeddetails.DeleteObject(delete);
db.SaveChanges();
}
return View();
}