Ejemplo n.º 1
0
 private static List <string> GetUsings(string entityNamespace)
 => new List <string>
 {
     EntityDbContextBuilder.GetDbContextNamespace(entityNamespace),
     EntityNamespaceConstants.DevOpsCodeDataAccessInterfacesRepository,
     EntityNamespaceConstants.MicrosoftAspNetCoreJsonPatch,
     EntityNamespaceConstants.MicrosoftAspNetCoreMvc,
     EntityNamespaceConstants.MicrosoftExtensionsLogging,
     EntityNamespaceConstants.SystemThreadingTasks
 };
Ejemplo n.º 2
0
        public IEnumerable <ICodeGeneratable> GetRepositories()
        {
            var tableName = Name.Split('.').Last();  // Foo.Bars => Bars
            var typeName  = tableName.Singularize(); // Bars => Bar

            if (string.IsNullOrWhiteSpace(KeyType))
            {
                KeyType = TypeConstants.Int;
            }
            var @static = !(Editable ?? false);

            yield return(EntityTypeBuilder.Build(Name, typeName, Description, Version, tableName, PackageReferences, SameAccountDependencies, KeyType, Properties, @static, EntityTypeId));

            yield return(EntityDbContextBuilder.Build(Name, typeName, Version, tableName, @static, DependsOn));

            yield return(EntityApiControllerBuilder.Build(Name, typeName, Version, KeyType, tableName, @static));
        }
Ejemplo n.º 3
0
        private static IEnumerable <string> GetSameAccountDependencies(string entityNamespace)
        {
            yield return(EntityDbContextBuilder.GetDbContextNamespace(entityNamespace));

            yield return(EntityNamespaceConstants.DevOpsCodeDataAccessMetapackagesApiControllers);
        }