예제 #1
0
 public DomainEventsController(MetaDbContext metaDbContext, CodeGenDbContext codeGenDbContext, IMapper mapper, ICodeGenerator generator)
 {
     _metaDbContext    = metaDbContext;
     _codeGenDbContext = codeGenDbContext;
     _mapper           = mapper;
     _generator        = generator;
 }
예제 #2
0
 public ValueObjectsController(MetaDbContext metaDbContext, CodeGenDbContext codeGenDbContext, IMapper mapper, ICodeGenerator generator)
 {
     _metaDbContext    = metaDbContext;
     _codeGenDbContext = codeGenDbContext;
     _mapper           = mapper;
     _generator        = generator;
 }
예제 #3
0
        public CodeTemplateCreatedHandler(CodeGenDbContext db)
        {
            Ensure.That(db).IsNotNull();

            _db = db;
        }
        public GetCodeTemplatesBySourceTypeHandler(CodeGenDbContext db)
        {
            Ensure.That(db).IsNotNull();

            _db = db;
        }
 public TemplatesController(CodeGenDbContext codeGenDbContext, IMapper mapper)
 {
     _codeGenDbContext = codeGenDbContext;
     _mapper           = mapper;
 }
예제 #6
0
파일: Startup.cs 프로젝트: pdeparcq/DoMeta
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env, MetaDbContext metaDbContext, CodeGenDbContext codeGenDbContext)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseSwagger();

            app.UseSwaggerUI(c =>
            {
                c.SwaggerEndpoint("/swagger/v1/swagger.json", "DoMeta API V1");
            });

            // Ensure that query db is created
            metaDbContext.Database.EnsureCreated();
            codeGenDbContext.Database.EnsureCreated();

            // Use Kledex and ensure that domain db is created
            app.UseKledex().EnsureDomainDbCreated();

            app.UseHttpsRedirection();

            app.UseRouting();

            app.UseCors("Cors");

            app.UseAuthorization();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllers();
            });
        }