Esempio 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));
        }
Esempio n. 2
0
 public static T CreateInstance <T>(this Table table)
 {
     return(TEHelpers.ThisTypeHasADefaultConstructor <T>()
                ? TEHelpers.CreateTheInstanceWithTheDefaultConstructor <T>(table)
                : TEHelpers.CreateTheInstanceWithTheValuesFromTheTable <T>(table));
 }