Update README.md
This commit is contained in:
committed by
GitHub
parent
43b3d8efb5
commit
91277203fd
@@ -19,8 +19,8 @@ Here is an example:
|
|||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
|
|
||||||
public class ApplicationUser : MongoIdentityUser<Guid>
|
public class ApplicationUser : MongoIdentityUser<Guid>
|
||||||
{
|
{
|
||||||
public ApplicationUser() : base()
|
public ApplicationUser() : base()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -28,10 +28,10 @@ Here is an example:
|
|||||||
public ApplicationUser(string userName, string email) : base(userName, email)
|
public ApplicationUser(string userName, string email) : base(userName, email)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ApplicationRole : MongoIdentityRole<Guid>
|
public class ApplicationRole : MongoIdentityRole<Guid>
|
||||||
{
|
{
|
||||||
public ApplicationRole() : base()
|
public ApplicationRole() : base()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -39,7 +39,7 @@ Here is an example:
|
|||||||
public ApplicationRole(string roleName) : base(roleName)
|
public ApplicationRole(string roleName) : base(roleName)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
The `Id` field is automatically set at instantiation, this also applies to users inheriting from `MongoIdentityUser<int>`, where a random integer is assigned to the `Id`. It is however not advised to rely on such random mechanism to set the primary key of your document. Using documents inheriting from `MongoIdentityRole` and `MongoIdentityUser` is recommended.
|
The `Id` field is automatically set at instantiation, this also applies to users inheriting from `MongoIdentityUser<int>`, where a random integer is assigned to the `Id`. It is however not advised to rely on such random mechanism to set the primary key of your document. Using documents inheriting from `MongoIdentityRole` and `MongoIdentityUser` is recommended.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user