📅  最后修改于: 2022-03-11 14:55:49.730000             🧑  作者: Mango
var itemToRemove = Context.Employ.SingleOrDefault(x => x.id == 1); //returns a single item.
if (itemToRemove != null) {
Context.Employ.Remove(itemToRemove);
Context.SaveChanges();
}