示例#1
0
        private Model.hierarchy3a GetInstance(System.Data.IDataReader result, System.Collections.Generic.IDictionary <string, int> ordinals)
        {
            var obj = new Model.hierarchy3a()
            {
                pid        = result.IsDBNull(ordinals["pid"]) ? new Guid() : result.GetGuid(ordinals["pid"]),
                fid        = result.IsDBNull(ordinals["fid"]) ? 0 : result.GetInt64(ordinals["fid"]),
                uid        = result.IsDBNull(ordinals["uid"]) ? new Guid() : result.GetGuid(ordinals["uid"]),
                numfield1  = result.IsDBNull(ordinals["numfield1"]) ? 0 : result.GetInt32(ordinals["numfield1"]),
                numfield2  = result.IsDBNull(ordinals["numfield2"]) ? 0 : result.GetInt32(ordinals["numfield2"]),
                numfield3  = result.IsDBNull(ordinals["numfield3"]) ? 0 : result.GetInt32(ordinals["numfield3"]),
                textfield1 = result.IsDBNull(ordinals["textfield1"]) ? null : result.GetString(ordinals["textfield1"]),
                textfield2 = result.IsDBNull(ordinals["textfield2"]) ? null : result.GetString(ordinals["textfield2"]),
                textfield3 = result.IsDBNull(ordinals["textfield3"]) ? null : result.GetString(ordinals["textfield3"])
            };

            return(obj);
        }
 private Model.hierarchy3a GetInstance(System.Data.IDataReader result, System.Collections.Generic.IDictionary<string, int> ordinals)
 {
     var obj = new Model.hierarchy3a()
     {
         pid = result.IsDBNull(ordinals["pid"]) ? new Guid() : result.GetGuid(ordinals["pid"]),
         fid = result.IsDBNull(ordinals["fid"]) ? 0 : result.GetInt64(ordinals["fid"]),
         uid = result.IsDBNull(ordinals["uid"]) ? new Guid() : result.GetGuid(ordinals["uid"]),
         numfield1 = result.IsDBNull(ordinals["numfield1"]) ? 0 : result.GetInt32(ordinals["numfield1"]),
         numfield2 = result.IsDBNull(ordinals["numfield2"]) ? 0 : result.GetInt32(ordinals["numfield2"]),
         numfield3 = result.IsDBNull(ordinals["numfield3"]) ? 0 : result.GetInt32(ordinals["numfield3"]),
         textfield1 = result.IsDBNull(ordinals["textfield1"]) ? null : result.GetString(ordinals["textfield1"]),
         textfield2 = result.IsDBNull(ordinals["textfield2"]) ? null : result.GetString(ordinals["textfield2"]),
         textfield3 = result.IsDBNull(ordinals["textfield3"]) ? null : result.GetString(ordinals["textfield3"])
     };
     return obj;
 }