例外:
无法更新EntitySet'Audit_Log',因为它有一个 定义查询并且没有元素存在于 元素支持当前 操作
我正在那样使用
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();