示例#1
0
        private static T_Entity DataReader2Entity_GetValue(System.Data.IDataReader dataReader)
        {
            var      FNullDecimal   = dataReader.GetValue(3);
            var      FNullBool      = dataReader.GetValue(5);
            var      NullStatus     = dataReader.GetValue(8);
            var      LastUpdateTime = dataReader.GetValue(10);
            T_Entity obj            = new T_Entity
            {
                FLong          = dataReader.GetInt64(0),
                FString        = dataReader.GetString(1),
                FDecimal       = dataReader.GetDecimal(2),
                FNullDecimal   = FNullDecimal == DBNull.Value ? default(decimal?) : (decimal)FNullDecimal,
                FBool          = dataReader.GetBoolean(4),
                FNullBool      = FNullBool == DBNull.Value ? default(bool?) : (bool)FNullBool,
                Status         = (EntityStatus)Enum.ToObject(_entityStatusType, dataReader.GetInt16(7)),
                NullStatus     = NullStatus == DBNull.Value ? default(EntityStatus?) : (EntityStatus)Enum.ToObject(_entityStatusType, NullStatus),
                CreationTime   = dataReader.GetDateTime(9),
                LastUpdateTime = LastUpdateTime == DBNull.Value ? default(DateTime?) : (DateTime)LastUpdateTime,
            };

            return(obj);
        }
示例#2
0
 public void New()
 {
     var entity = new T_Entity();
 }