Got the new ui flow working and the models updated. Need to get changes written to the database.
This commit is contained in:
28
OpenArchival.DataAccess/Program.cs
Normal file
28
OpenArchival.DataAccess/Program.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OpenArchival.DataAccess;
|
||||
static class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
// In Program.cs
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Retrieve the connection string from appsettings.json
|
||||
var connectionString = builder.Configuration.GetConnectionString("PostgresConnection");
|
||||
|
||||
// Add the DbContext to the dependency injection container
|
||||
builder.Services.AddDbContext<ArchiveDbContext>(options =>
|
||||
options.UseNpgsql(connectionString));
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
app.Run();
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user