コード例 #1
0
        public override string Generate(Table table, GeneratorOptions options)
        {
            var template = new DataTransferObjectTemplates();

            template.Session = new Dictionary <string, object>();
            template.Session.Add("_namespace", AppSettings.Instance.Namespace);

            template.Session.Add("tableName", table.TableName);
            template.Session.Add("columns", table.InsertableColumns);
            template.Session.Add("options", options);
            template.Session.Add("table", table);

            template.Initialize();

            return(template.TransformText());
        }
コード例 #2
0
        public override string Generate(Table table, GeneratorOptions options)
        {
            var tdo = new DataTransferObjectTemplates();

            tdo.Session = new Dictionary <string, object>();
            tdo.Session.Add("_namespace", "NestPayment");



            tdo.Session.Add("tableName", table.TableName.ToPascalCase());
            tdo.Session.Add("tableNameToLower", table.TableName.ToPascalCase().ToLower());
            tdo.Session.Add("columns", table.InsertableColumns);
            tdo.Session.Add("options", options);
            tdo.Session.Add("table", table);

            tdo.Initialize();

            return(tdo.TransformText());
        }