Refactor: the project is now divided into a more clear structure, with **Infrastructure** and **Application** layers added. Refactor: configurations are split into sections for different layers. Fix: now EF Core related operations, such as migration, should be invoked in `OptixServe.Infrastructure`, with config file and data dir passed into `dotnet ef` command. See `OptixServe.Infrastructure/Utilites/DesignTimeDbContextFactory.cs` for details. Fix: EF migrations are ignored in gitignore on purpose in early development.
19 lines
351 B
C#
19 lines
351 B
C#
namespace OptixServe.Infrastructure.Configuration;
|
|
|
|
public record InfrastructureConfiguration
|
|
{
|
|
public DatabaseSettings? Database { get; set; } = new();
|
|
}
|
|
|
|
public enum DatabaseType
|
|
{
|
|
Sqlite,
|
|
MySQL
|
|
}
|
|
|
|
public record DatabaseSettings
|
|
{
|
|
public DatabaseType Type { get; set; } = DatabaseType.Sqlite;
|
|
public string? Host { get; set; }
|
|
}
|