111,126
社区成员
发帖
与我相关
我的任务
分享
EntityKey key = context.CreateEntityKey("Users", staff);
object orgStaff;
if (key != null && context.TryGetObjectByKey(key, out orgStaff))
{
context.ApplyPropertyChanges(key.EntitySetName, staff);// 这里会报错,说他们的entityType类型不一致,我也不知道怎样才能把它们搞成一致。
context.SaveChanges();
}