Example #1
0
        public static object ToDynamicInstance(this DataRow row, string typeName)
        {
            AssemblyBuilder ignore;
            Type            dynamicType = ToDynamicType(row, typeName, out ignore);
            ConstructorInfo ctor        = dynamicType.GetConstructor(new Type[] { });
            object          instance    = ctor.Invoke(null);//Activator.CreateInstance(dynamicType);

            DatabaseAgent.FromDataRow(instance, row);
            return(instance);
        }
Example #2
0
 public static void HydrateFromDataRow(this object target, DataRow row)
 {
     DatabaseAgent.FromDataRow(target, row);
 }
Example #3
0
 public static void HydrateFromDataRow(this object target, DataRow row, Dictionary <string, string> propertyToColumnMap)
 {
     DatabaseAgent.FromDataRow(target, row, propertyToColumnMap);
 }
 internal DataRelationshipDefinition(DataRow row)
     : this()
 {
     //this.row = row;
     DatabaseAgent.FromDataRow(this, row);
 }