void Complete(Table table) { Type type = table.Type; table.IdentityBehaviour = GetPrimaryKeyAttribute(type).IdentityBehaviour; table.Name = GenerateTableName(type, Settings.TypeAttribute <TableNameAttribute>(type)); table.CleanTypeName = GenerateCleanTypeName(type); table.Fields = GenerateFields(PropertyRoute.Root(type), table, NameSequence.Void, forceNull: false, inMList: false); table.Mixins = GenerateMixins(PropertyRoute.Root(type), table, NameSequence.Void); table.GenerateColumns(); }
public Table NewView(Type type) { Table table = new Table(type) { Name = GenerateTableName(type, Settings.TypeAttribute <TableNameAttribute>(type)), IsView = true }; table.Fields = GenerateFields(PropertyRoute.Root(type), table, NameSequence.Void, forceNull: false, inMList: false); table.GenerateColumns(); return(table); }
void Complete(Table table) { using (HeavyProfiler.LogNoStackTrace("Complete", () => table.Type.Name)) using (var tr = HeavyProfiler.LogNoStackTrace("GetPrimaryKeyAttribute", () => table.Type.Name)) { Type type = table.Type; table.IdentityBehaviour = GetPrimaryKeyAttribute(type).IdentityBehaviour; tr.Switch("GenerateTableName"); table.Name = GenerateTableName(type, Settings.TypeAttribute <TableNameAttribute>(type)); tr.Switch("GenerateCleanTypeName"); table.CleanTypeName = GenerateCleanTypeName(type); tr.Switch("GenerateFields"); table.Fields = GenerateFields(PropertyRoute.Root(type), table, NameSequence.Void, forceNull: false, inMList: false); tr.Switch("GenerateMixins"); table.Mixins = GenerateMixins(PropertyRoute.Root(type), table, NameSequence.Void); tr.Switch("GenerateColumns"); table.GenerateColumns(); } }