예제 #1
0
        public static String Get(JsonSchema4 schema, String ns)
        {
            String Model, model;

            NameGenerator.CreatePascalAndCamel(schema.Title, out Model, out model);
            String Models, models;

            NameGenerator.CreatePascalAndCamel(schema.GetPluralName(), out Models, out models);

            var    authAttribute = "";
            String authName      = schema.GetAuthorizationRoleString();

            if (authName != null)
            {
                authAttribute = $@"[Authorize(Roles = {authName})]
        ";
            }
            return(Create(ns, NameGenerator.CreatePascal(schema.GetUiControllerName()), Model, model, Models, models, authAttribute));
        }
 public static String GetFileName(JsonSchema4 schema)
 {
     return($"Views/{schema.GetUiControllerName()}/{schema.GetPluralName()}.ts");
 }
예제 #3
0
 public static String GetFileName(JsonSchema4 schema)
 {
     return($"Controllers/{schema.GetUiControllerName()}Controller.{schema.GetPluralName()}.cs");
 }