mutil-key 好像不能用...

Mar 24, 2010 at 7:04 AM

mutil-key 好像不能用...

文档示例代码
public
class MKey : IDbObject { [DbKey(IsDbGenerate = false), Length(50)] public string Name; [DbKey(IsDbGenerate = false)] public int Age; public bool Gender; }

 

var mkey=new MKey(){Name="myName",Age="123",Gender=true};

DbEntry.Save(mkey);

报错:To call this function, the table must have one primary key.

 

 

 

Coordinator
Mar 24, 2010 at 9:57 AM
var mkey=new MKey(){Name="myName",Age="123",Gender=true};

DbEntry.Context.Insert(mkey);