diff --git a/WorkFlow.API/Program.cs b/WorkFlow.API/Program.cs index 8264bac..7f000ef 100644 --- a/WorkFlow.API/Program.cs +++ b/WorkFlow.API/Program.cs @@ -1,6 +1,14 @@ +using WorkFlow.Application; +using DigitalData.UserManager.Application; +using DigitalData.UserManager.Infrastructure.Repositories; +using Microsoft.EntityFrameworkCore; + 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(options => options.UseSqlServer(cnn_str).EnableDetailedErrors()); builder.Services.AddControllers(); // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle diff --git a/WorkFlow.API/appsettings.json b/WorkFlow.API/appsettings.json index 10f68b8..a78d677 100644 --- a/WorkFlow.API/appsettings.json +++ b/WorkFlow.API/appsettings.json @@ -5,5 +5,8 @@ "Microsoft.AspNetCore": "Warning" } }, - "AllowedHosts": "*" -} + "AllowedHosts": "*", + "ConnectionStrings": { + "Default": "Server=SDD-VMP04-SQL17\\DD_DEVELOP01;Database=DD_ECM;User Id=g+2edXEbMbujCUjh7INZRQ==;Password=Bz/n9pu8EyzlVqicaMRQGQ==;Encrypt=false;TrustServerCertificate=True;" + } +} \ No newline at end of file