feat(API): Dienste Work Flow und User Manager hinzugefügt.

This commit is contained in:
Developer 02 2024-10-24 20:25:26 +02:00
parent c7f1be7c58
commit 94a2d414d3

View File

@ -1,14 +1,15 @@
using WorkFlow.Application;
using DigitalData.UserManager.Application;
using DigitalData.UserManager.Infrastructure.Repositories;
using Microsoft.EntityFrameworkCore;
using WorkFlow.Infrastructure;
var builder = WebApplication.CreateBuilder(args);
var config = builder.Configuration;
// Add services to the container.
var cnn_str = config.GetConnectionString("Default") ?? throw new ArgumentNullException("Default connection string not found.");
builder.Services.AddDbContext<UserManagerDbContext>(options => options.UseSqlServer(cnn_str).EnableDetailedErrors());
var cnn_str = config.GetConnectionString("Default") ?? throw new ("Default connection string not found.");
builder.Services.AddDbContext<WFDBContext>(options => options.UseSqlServer(cnn_str).EnableDetailedErrors());
builder.Services.AddWorkFlow().AddUserManager<WFDBContext>();
builder.Services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle