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