0

例外

无法更新 EntitySet 'Audit_Log',因为它有一个 DefiningQuery 并且元素中不存在支持当前操作的元素。

我是这样使用的

Audit_LogEntity ale = new Audit_LogEntity();`

MemoryStream ms = new MemoryStream();
NetDataContractSerializer serialize = new NetDataContractSerializer();

serialize.Serialize(ms, obj);            

Audit_Log al = new Audit_Log();
al.Object = ms.ToArray();
al.DateTime = DateTime.Now;
al.Page_Name = pagename;
al.Pageid = uniqueid;
al.UserId = userid;

ale.AddToAudit_Log(al);

ale.SaveChanges();
4

0 回答 0