Exemplo n.º 1
0
        public static T CreateInstance <T>(this Table table, InstanceCreationOptions creationOptions)
        {
            var instanceTable = TEHelpers.GetTheProperInstanceTable(table, typeof(T));

            return(TEHelpers.ThisTypeHasADefaultConstructor <T>()
                       ? TEHelpers.CreateTheInstanceWithTheDefaultConstructor <T>(instanceTable, creationOptions)
                       : TEHelpers.CreateTheInstanceWithTheValuesFromTheTable <T>(instanceTable, creationOptions));
        }
Exemplo n.º 2
0
 public static T CreateInstance <T>(this Table table)
 {
     return(TEHelpers.ThisTypeHasADefaultConstructor <T>()
                ? TEHelpers.CreateTheInstanceWithTheDefaultConstructor <T>(table)
                : TEHelpers.CreateTheInstanceWithTheValuesFromTheTable <T>(table));
 }