Exemplo n.º 1
0
 public RowGenerator(DbSetInfo dbSetInfo, IEnumerable <object> dataSource, IDataHelper dataHelper)
 {
     _dbSetInfo  = dbSetInfo ?? throw new ArgumentNullException(nameof(dbSetInfo));
     _dataSource = dataSource ?? throw new ArgumentNullException(nameof(dataSource));
     _dataHelper = dataHelper ?? throw new ArgumentNullException(nameof(dataHelper));
     fieldInfos  = _dbSetInfo.GetInResultFields();
     pkInfos     = _dbSetInfo.GetPKFields();
 }
Exemplo n.º 2
0
 public RowGenerator(DbSetInfo dbSetInfo, IEnumerable <object> dataSource, IDataHelper dataHelper)
 {
     _dbSetInfo  = dbSetInfo;
     _dataSource = dataSource;
     _dataHelper = dataHelper;
     fieldInfos  = _dbSetInfo.GetInResultFields();
     fieldCnt    = fieldInfos.Length;
     pkInfos     = _dbSetInfo.GetPKFields();
 }
Exemplo n.º 3
0
 public static FieldName[] GetNames(this DbSetInfo dbSetInfo)
 {
     return
         (dbSetInfo.GetInResultFields()
          .Select(
              fi =>
              new FieldName
     {
         n = fi.fieldName,
         p = fi.fieldType == FieldType.Object ? fi.GetNames() : null
     })
          .ToArray());
 }