如何检查Entity Framework中是否存在对象

如何检查Entity Framework中是否存在对象

问题描述:



这是我的代码,

Hi,
This is my code,

var results = context.Cells.Where((Cell c) => !loadOperation.Entities.Contains(c)).ToList();
results.ForEach((Cell c) => context.Cells.Detach(c));





如何使用Lambada表达式检查实体框架中是否存在对象



How to check if object exists in Entity Framework using Lambada expression

http://www.streetrat.in/Articles/Content/Check-an -object-exists-in-entity-framework.99.aspx?RatHistory = 99 [ ^ ]





这里已经讨论过这个快乐的编码
http://www.streetrat.in/Articles/Content/Check-an-object-exists-in-entity-framework.99.aspx?RatHistory=99[^]


This has been discussed here happy coding