Recreated solution with web app template. Improved theme. Switched to ShadcnBlazor library
This commit is contained in:
19
Moonlight.Api/Startup/Startup.Database.cs
Normal file
19
Moonlight.Api/Startup/Startup.Database.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Moonlight.Api.Configuration;
|
||||
using Moonlight.Api.Database;
|
||||
using Moonlight.Api.Services;
|
||||
|
||||
namespace Moonlight.Api.Startup;
|
||||
|
||||
public partial class Startup
|
||||
{
|
||||
private static void AddDatabase(WebApplicationBuilder builder)
|
||||
{
|
||||
builder.Services.AddOptions<DatabaseOptions>().BindConfiguration("WebApp:Database");
|
||||
|
||||
builder.Services.AddDbContext<DataContext>();
|
||||
builder.Services.AddScoped(typeof(DatabaseRepository<>));
|
||||
builder.Services.AddHostedService<DbMigrationService>();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user