Skip to content

Commit

Permalink
Fix typo of UserMangement to UserManagement
Browse files Browse the repository at this point in the history
  • Loading branch information
Xian55 committed Jan 4, 2024
1 parent f34341d commit 0aeb485
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ internal static IApplicationBuilder EnsureDatabaseCreated(this IApplicationBuild
{
using IServiceScope serviceScope = builder.ApplicationServices.CreateScope();

using UserMangementDbContext dbContext = serviceScope.ServiceProvider.GetRequiredService<UserMangementDbContext>();
using UserManagementDbContext dbContext = serviceScope.ServiceProvider.GetRequiredService<UserManagementDbContext>();

//dbContext.Database.EnsureCreated();

Expand Down
4 changes: 2 additions & 2 deletions UserManagement.Persistence/DependencyInjection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ public static IServiceCollection AddPersistence(this IServiceCollection services
_mongoClient = new MongoClient(connectionString);
IMongoDatabase db = _mongoClient.GetDatabase("UserManagement");

services.AddDbContext<UserMangementDbContext>(options => options.UseMongoDB(_mongoClient, db.DatabaseNamespace.DatabaseName));
services.AddScoped<IDbContext>(serviceProvider => serviceProvider.GetRequiredService<UserMangementDbContext>());
services.AddDbContext<UserManagementDbContext>(options => options.UseMongoDB(_mongoClient, db.DatabaseNamespace.DatabaseName));
services.AddScoped<IDbContext>(serviceProvider => serviceProvider.GetRequiredService<UserManagementDbContext>());
//services.AddSingleton<IDbConnection>(_ => db);

return services;
Expand Down
2 changes: 1 addition & 1 deletion UserManagement.Persistence/Extensions/SeedExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace UserManagement.Persistence.Extensions;
public static class SeedExtensions
{
public static void SeedDatabase(
this UserMangementDbContext dbContext,
this UserManagementDbContext dbContext,
JsonSerializerOptions options)
{
if (dbContext.Set<User>().Any())
Expand Down
4 changes: 2 additions & 2 deletions UserManagement.Persistence/UserManagementDbContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

namespace UserManagement.Persistence;

public sealed class UserMangementDbContext : DbContext, IDbContext
public sealed class UserManagementDbContext : DbContext, IDbContext
{
public UserMangementDbContext(DbContextOptions options) : base(options)
public UserManagementDbContext(DbContextOptions options) : base(options)
{
}

Expand Down

0 comments on commit 0aeb485

Please sign in to comment.