Adds editorconfig and refactors to the established rules

This commit is contained in:
BinaryAlley committed 2024-09-23 16:48:48 +03:00
1 parent 712a0f2b27
commit cd44f11d9e
138 files changed
+1799 -1629

No files matched your search

@@ -27,13 +27,10 @@ public static class DataAccessLayerServices
/// <returns>The updated <see cref="IServiceCollection"/>.</returns>
public static void AddDataAccessLayerServices(this IServiceCollection services)
{
var basePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
string? basePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
if (!Directory.Exists(basePath))
throw new DirectoryNotFoundException($"The base path '{basePath}' does not exist.");
services.AddDbContext<LuminaDbContext>(options =>
{
options.UseSqlite($"Data Source={Path.Combine(basePath, "Lumina.db")}");
});
services.AddDbContext<LuminaDbContext>(options => options.UseSqlite($"Data Source={Path.Combine(basePath, "Lumina.db")}"));
services.AddScoped<IUnitOfWork, UnitOfWork>();
Type[]? dataAccessLayerTypes = Assembly.GetExecutingAssembly().GetTypes();