Example #1
0
 /// <summary>
 /// 客户实体数据映射
 /// </summary>
 /// <param name="reader"></param>
 /// <returns></returns>
 public static PasswordToken PasswordToken_Map(DataReader reader)
 {
     PasswordToken PasswordToken = new PasswordToken
     {
         CreateTime = reader.GetDateTime("CreateTime"),
         Expire = reader.GetDateTime("Expire"),
         Token = reader.GetString("Token"),
         UserName = reader.GetString("UserName")
     };
     return PasswordToken;
 }
Example #2
0
        static PasswordTokenRepository()
        {
            PasswordToken entity = new PasswordToken();
            Type type = entity.GetType();
            AppendDataMap(type, "CreateTime", () => entity.CreateTime);
            AppendDataMap(type, "Expire", () => entity.Expire);
            AppendDataMap(type, "Token", () => entity.Token);
            AppendDataMap(type, "UserName", () => entity.UserName);
            ResultMapDelegate<PasswordToken> queryMap = PasswordToken_Map;
            QueryMapContainer[entity.GetType()] = queryMap;

        }