GetEntityRowView() public static method

public static GetEntityRowView ( GeneratorConfig config ) : RazorGenerator.Templating.RazorTemplateBase
config GeneratorConfig
return RazorGenerator.Templating.RazorTemplateBase
示例#1
0
        public static string Generate(IDbConnection connection, string tableSchema, string table, string module, string connectionKey, string entityClass, string permission,
                                      GeneratorConfig config)
        {
            var model = GenerateModel(connection, tableSchema, table, module, connectionKey, entityClass, permission, config);

            return(Templates.Render(GeneratorConfig.GetEntityRowView(config), model));
        }
示例#2
0
 private void GenerateRow()
 {
     if (config.RowFieldsSurroundWithRegion)
     {
         CreateNewSiteWebFile(Templates.Render(GeneratorConfig.GetEntityRowView(config), model, config),
                              Path.Combine(@"Modules\", Path.Combine(model.Module ?? model.RootNamespace, Path.Combine(model.ClassName, model.RowClassName + ".cs"))));
     }
     else
     {
         CreateNewSiteWebFile(Templates.Render(GeneratorConfig.GetEntityRowView(config), model),
                              Path.Combine(@"Modules\", Path.Combine(model.Module ?? model.RootNamespace, Path.Combine(model.ClassName, model.RowClassName + ".cs"))));
     }
 }
示例#3
0
        public static string Generate(IDbConnection connection, string tableSchema, string table, string module, string connectionKey, string entityClass, string permission,
                                      GeneratorConfig config)
        {
            var model = GenerateModel(connection, tableSchema, table, module, connectionKey, entityClass, permission, config);

            if (config.RowFieldsSurroundWithRegion)
            {
                return(Templates.Render(GeneratorConfig.GetEntityRowView(config), model, config));
            }
            else
            {
                return(Templates.Render(GeneratorConfig.GetEntityRowView(config), model));
            }
        }