Beispiel #1
0
        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();
        }
Beispiel #2
0
        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();
        }
Beispiel #3
0
 public DpoField(DpoClass dpoClass, IColumn column)
 {
     this.dpoClass = dpoClass;
     this.column = column;
 }
Beispiel #4
0
 public DpoField(DpoClass dpoClass, IColumn column)
 {
     this.dpoClass = dpoClass;
     this.column   = column;
 }