Beispiel #1
0
 public static object[] GetPKValues(this RowInfo rowInfo, IDataHelper dataHelper)
 {
     Type entityType = rowInfo.dbSetInfo.EntityType;
     Field[] finfos = rowInfo.dbSetInfo.GetPKFields();
     object[] result = new object[finfos.Length];
     for (int i = 0; i < finfos.Length; ++i)
     {
         ValueChange fv = rowInfo.values.Single(v => v.fieldName == finfos[i].fieldName);
         result[i] = dataHelper.DeserializeField(entityType, finfos[i], fv.val);
     }
     return result;
 }
Beispiel #2
0
        public static object[] GetPKValues(this RowInfo rowInfo, IDataHelper dataHelper)
        {
            var entityType = rowInfo.dbSetInfo.EntityType;
            var finfos     = rowInfo.dbSetInfo.GetPKFields();
            var result     = new object[finfos.Length];

            for (var i = 0; i < finfos.Length; ++i)
            {
                var fv = rowInfo.values.Single(v => v.fieldName == finfos[i].fieldName);
                result[i] = dataHelper.DeserializeField(entityType, finfos[i], fv.val);
            }
            return(result);
        }
Beispiel #3
0
        public static object[] GetPKValues(this RowInfo rowInfo, IDataHelper dataHelper)
        {
            DbSetInfo dbSetInfo = rowInfo.GetDbSetInfo();

            System.Type entityType = dbSetInfo.GetEntityType();
            Field[]     finfos     = dbSetInfo.GetPKFields();
            object[]    result     = new object[finfos.Length];
            for (int i = 0; i < finfos.Length; ++i)
            {
                ValueChange fv = rowInfo.values.Single(v => v.fieldName == finfos[i].fieldName);
                result[i] = dataHelper.DeserializeField(entityType, finfos[i], fv.val);
            }
            return(result);
        }