Example #1
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddControllers();

            //Setup para configuração do Swagger
            SwaggerSetup.AddSwaggerSetup(services);

            //Setup para configuração do EF
            EntityFrameworkSetup.AddEntityFrameworkSetup(services, Configuration);

            //Setup para o JWT
            JwtBearerSetup.AddJwtBearerSetup(services, Configuration);

            //Setup para MongoDB
            MongoDbSetup.AddMongoDbSetup(services, Configuration);

            //Injecao de dependencia
            DependenxyInjection.Register(services);

            //Setup para MediatR
            MediatRSetup.AddMediatRSetup(services);

            //Setup para AutoMapper
            AutoMapperSetup.AddAutoMapperSetup(services);

            //Setup para o CORS
            CorsSetup.AddCorsSetup(services);
        }
Example #2
0
        // This method gets called by the runtime. Use this method to add services to the container.
        // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
        public void ConfigureServices(IServiceCollection services)
        {
            //habilitar o MVC
            services.AddControllersWithViews().AddRazorRuntimeCompilation();

            //configurando o entityframework
            EntityFrameworkSetup.AddEntityFramework(services, Configuration);

            //configurando a injeção de dependência
            DependencyInjectionSetup.AddDependencyInjection(services);
        }
Example #3
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddControllers();

            EntityFrameworkSetup.AddEntityFrameworkSetup(services, Configuration);

            DependencyInjection.Register(services);

            AutoMapperSetup.AddAutoMapperSetup(services);

            CorsSetup.AddCorsSetup(services);

            SwaggerSetup.AddSwaggerSetup(services);
        }
Example #4
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddControllers();

            //Swagger configration setup
            SwaggerSetup.AddSwaggerSetup(services);

            //EntityFrmework configuration setup
            EntityFrameworkSetup.AddEntityFrameworkSetup(services, Configuration);

            //Mediator configration setup
            MediatorSetup.AddMediatorSettup(services);

            //Dependency Injection
            DependencyInjection.Register(services);
        }
Example #5
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddControllers();

            //Configuração do Swagger
            SwaggerSetup.ConfigureServices(services);

            //Configuração do CORS
            CorsSetup.ConfigureServices(services);

            //Configuração do EntityFramework
            EntityFrameworkSetup.ConfigureServices(services, Configuration);

            //Configuração de Injeção de Dependência
            DependencyInjectionSetup.ConfigureServices(services);

            //Configuração do AutoMapper
            AutoMapperSetup.ConfigureServices(services);
        }
Example #6
0
 // This method gets called by the runtime. Use this method to add services to the container.
 public void ConfigureServices(IServiceCollection services)
 {
     services.AddControllers();
     //setup para configuração Swagger..
     SwaggerSetup.AddSwaggerSetup(services);
     //setup para configuração do EntityFramework..
     EntityFrameworkSetup.AddEntityFrameworkSetup(services, Configuration);
     //setup para configuração de injeção de dependencia..
     InjecaoDependencia.Registrar(services);
     //setup para JWT Bearer..
     JwtBearerSetup.AddJwtBearerSetup(services, Configuration);
     //setup para MongoDB..
     MongoDBSetup.AddMongoDBSetup(services, Configuration);
     //setup para MediatR..
     MediatRSetup.AddMediatRSetup(services);
     //setup para AutoMapper..
     AutoMapperSetup.AddAutoMapperSetup(services);
     //Setup para o Cors
     CorsSetup.AddCorsSetup(services);
 }
Example #7
0
        internal void BuildEntityModel(ErdCanvasModel[] canvases, Dispatcher dispatcher)
        {
            if (EntityModelScript.Setup == null)
            {
                this.tempSetup = new EntityFrameworkSetup();

                ObjectViewer viewer = new ObjectViewer("EF Setup", this.tempSetup);

                viewer.ModelViewItemBrowse += this.SetupModel_Browse;

                bool?result = viewer.ShowDialog();

                if (!result.HasValue || !result.Value)
                {
                    return;
                }

                EntityModelScript.Setup = viewer.ModelObject.To <EntityFrameworkSetup>();
            }

            this.RunScriptBuilderAsync(canvases, dispatcher);
        }