WIP: Resolve all code issues
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user