4、inese_PRC_CI_AS NULL , [LastLogon] [datetime] NULL ) ON [PRIMARY]GO三.编写User实体类首先我们新建一个User类并让它继承于ActiveRecordBase类public class User : ActiveRecordBase{ //}为User类添加特性,其实就是告诉ActiveRecord,User类所对应的数据库中的数据表名为Users[ActiveRecord("Users")]public class User : ActiveRecordBase{ //}下面我们的工作就
5、是为实体类添加属性[ActiveRecord("Users")]public class User : ActiveRecordBase{ private int _id; private string _name; private string _password; private string _emailAddress; private DateTime _lastLogon; [PrimaryKey(PrimaryKeyType.Identity, "LogonID")] public int Id {
6、get { return _id; } set { _id = value; } } [Property("LogonName")] public string Name { get { return _name; } set { _name = value; } } [Property("Password")] public string Password { get { return _password; } set { _passwor
7、d = value; } } [Property("EmailAddress")] public string Address { get { return _emailAddress; } set { _emailAddress = value; } } [Property("LastLogon")] public DateTime LastLogon { get { return _lastLogon; }