refactor(backend): use explicit types instead of var by default
This commit is contained in:
parent
bc7fd6d804
commit
649988db25
52 changed files with 506 additions and 420 deletions
|
@ -1,3 +1,4 @@
|
|||
using Npgsql;
|
||||
using Serilog;
|
||||
|
||||
namespace Foxnouns.Backend.Database;
|
||||
|
@ -9,8 +10,8 @@ public static class DatabaseServiceExtensions
|
|||
Config config
|
||||
)
|
||||
{
|
||||
var dataSource = DatabaseContext.BuildDataSource(config);
|
||||
var loggerFactory = new LoggerFactory().AddSerilog(dispose: false);
|
||||
NpgsqlDataSource dataSource = DatabaseContext.BuildDataSource(config);
|
||||
ILoggerFactory loggerFactory = new LoggerFactory().AddSerilog(dispose: false);
|
||||
|
||||
serviceCollection.AddDbContext<DatabaseContext>(options =>
|
||||
DatabaseContext.BuildOptions(options, dataSource, loggerFactory)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue