WIP: Resolve all code issues

This commit is contained in:
Michał Zieliski
2024-06-18 18:39:02 +02:00
parent f93bb9cd42
commit c2a98e0386
10 changed files with 363 additions and 441 deletions

View File

@@ -6,10 +6,10 @@ namespace WebAPI
{
public class AppDbContext : DbContext
{
public DbSet<User> Users { get; set; }
public DbSet<Layer> Layers { get; set; }
public DbSet<Record> Records { get; set; }
public DbSet<ProcessSource> ProcessSources { get; set; }
public DbSet<User> Users { get; init; }
public DbSet<Layer> Layers { get; init; }
public DbSet<Record> Records { get; init; }
public DbSet<ProcessSource> ProcessSources { get; init; }
public AppDbContext(DbContextOptions<AppDbContext> options) : base(options)
{
@@ -24,14 +24,14 @@ namespace WebAPI
});
}
public static readonly Microsoft.Extensions.Logging.LoggerFactory _myLoggerFactory =
new LoggerFactory(new[] {
private static readonly LoggerFactory MyLoggerFactory =
new(new[] {
new Microsoft.Extensions.Logging.Debug.DebugLoggerProvider()
});
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseLoggerFactory(_myLoggerFactory);
optionsBuilder.UseLoggerFactory(MyLoggerFactory);
}
}
}