public void CreateClass() { ClassTableName ctname = new ClassTableName(tableName) { Option = Option }; ClassName cname = new ClassName(Option.NameSpace, Option.Modifier, ctname); ITable schema = new TableSchema(tableName); var dpoClass = new DpoClass(schema, cname, Option); var sourceCode = dpoClass.Generate(cname.Modifier, ctname); string fileName = string.Format("{0}\\{1}.cs", Option.OutputPath, cname.Class); if (!Directory.Exists(Option.OutputPath)) { Directory.CreateDirectory(Option.OutputPath); } StreamWriter sw = new StreamWriter(fileName); sw.Write(sourceCode); sw.Close(); }
public void CreateClass() { ClassTableName ctname = new ClassTableName(tableName) { Option = Option }; ClassName cname = new ClassName(Option.NameSpace, Option.Modifier, ctname); ITableSchema schema = new TableSchema(tableName); var dpoClass = new DpoClass(schema, cname, Option); var sourceCode = dpoClass.Generate(cname.Modifier, ctname); string fileName = string.Format("{0}\\{1}.cs", Option.OutputPath, cname.Class); if (!Directory.Exists(Option.OutputPath)) { Directory.CreateDirectory(Option.OutputPath); } StreamWriter sw = new StreamWriter(fileName); sw.Write(sourceCode); sw.Close(); }
public DpoField(DpoClass dpoClass, IColumn column) { this.dpoClass = dpoClass; this.column = column; }