Skip to content

Commit

Permalink
Fixed concrete MongoDbConnection in constructor
Browse files Browse the repository at this point in the history
also some formatting
  • Loading branch information
JohnCampionJr committed Dec 19, 2020
1 parent 971ff1b commit b6c0978
Show file tree
Hide file tree
Showing 5 changed files with 458 additions and 458 deletions.
Expand Up @@ -25,7 +25,7 @@ public class MongoIdentityDbContext<TUser> : MongoIdentityDbContext<TUser, Mongo
/// Initializes a new instance of <see cref="MongoIdentityDbContext"/>.
/// </summary>
/// <param name="connection">The connection to be used by a <see cref="MongoDbContext"/>.</param>
public MongoIdentityDbContext(MongoDbConnection connection) : base(connection) { }
public MongoIdentityDbContext(IMongoDbConnection connection) : base(connection) { }
}

/// <summary>
Expand All @@ -38,7 +38,7 @@ public class MongoIdentityDbContext<TUser, TRole> : MongoIdentityDbContext<TUser
/// Initializes a new instance of <see cref="MongoIdentityDbContext"/>.
/// </summary>
/// <param name="connection">The connection to be used by a <see cref="MongoDbContext"/>.</param>
public MongoIdentityDbContext(MongoDbConnection connection) : base(connection) { }
public MongoIdentityDbContext(IMongoDbConnection connection) : base(connection) { }
}

/// <summary>
Expand Down
Expand Up @@ -21,7 +21,7 @@ public MongoIdentityRole()

public MongoIdentityRole(string name) : this()
{
Check.NotNull(name, nameof(name));
Check.NotNull(name, nameof(name));
Name = name;
NormalizedName = name.Normalize().ToUpperInvariant();
}
Expand Down
6 changes: 3 additions & 3 deletions src/MongoFramework.AspNetCore.Identity/MongoIdentityUser.cs
Expand Up @@ -15,16 +15,16 @@ public class MongoIdentityUser : MongoIdentityUser<string>
public class MongoIdentityUser<TKey> : IdentityUser<TKey> where TKey : IEquatable<TKey>
{
public MongoIdentityUser()
{
Roles = new List<TKey>();
{
Roles = new List<TKey>();
Claims = new List<IdentityUserClaim<TKey>>();
Logins = new List<IdentityUserLogin<TKey>>();
Tokens = new List<IdentityUserToken<TKey>>();
}

public MongoIdentityUser(string userName) : this()
{
Check.NotNull(userName, nameof(userName));
Check.NotNull(userName, nameof(userName));
UserName = userName;
NormalizedUserName = userName.Normalize().ToUpperInvariant();
}
Expand Down

0 comments on commit b6c0978

Please sign in to comment.