API oldaláról sokminden
This commit is contained in:
@@ -9,22 +9,23 @@ using Serilog;
|
||||
using WorkFlowCheck.BL.Mappings;
|
||||
using WorkFlowCheck.BL.Infra;
|
||||
using WorkFlowCheck.DL.Seed;
|
||||
using WorkFlowCheck.Common.RequestContext;
|
||||
using WorkFlowCheck.API.RequestContext;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
|
||||
|
||||
Log.Logger = new LoggerConfiguration()
|
||||
.ReadFrom.Configuration(builder.Configuration)
|
||||
.CreateLogger();
|
||||
|
||||
|
||||
builder.Services.AddAutoMapper(typeof(MapperProfile));
|
||||
builder.Services.AddMemoryCache();
|
||||
builder.Services.AddHttpContextAccessor();
|
||||
builder.Services.AddScoped<IRequestContext, HttpRequestContext>();
|
||||
|
||||
var connectionString = builder.Configuration.GetConnectionString("DefaultConnection");
|
||||
|
||||
builder.Services.AddDbContext<AppDbContext>(options =>
|
||||
options.UseSqlServer(connectionString));
|
||||
options.UseSqlServer(connectionString, x => x.MigrationsAssembly("WorkFlowCheck.DL")));
|
||||
//DI
|
||||
|
||||
DIConfig.DIInit(builder.Services);
|
||||
|
||||
Reference in New Issue
Block a user