Fixed hierarchy of MVC sample project. Updated documentation.
This commit is contained in:
@@ -20,7 +20,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.RazorPages", "Samples\RazorPages\Sample.RazorPages.csproj", "{0C8F67DC-B6B3-4D8C-9E33-BBB47F858BE3}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.RazorPages", "Samples\RazorPages\Sample.RazorPages.csproj", "{0C8F67DC-B6B3-4D8C-9E33-BBB47F858BE3}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample.Mvc", "Samples\Mvc\Sample.Mvc\Sample.Mvc.csproj", "{8AA88A38-C74A-4F0D-9853-EFA0D78F0E63}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample.Mvc", "Samples\Mvc\Sample.Mvc.csproj", "{8AA88A38-C74A-4F0D-9853-EFA0D78F0E63}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ public class AppUser : Raven.Identity.IdentityUser
|
|||||||
"Urls": [
|
"Urls": [
|
||||||
"http://live-test.ravendb.net"
|
"http://live-test.ravendb.net"
|
||||||
],
|
],
|
||||||
"DatabaseName": "Raven.Identity.Sample",
|
"DatabaseName": "Raven.Identity.Sample.RazorPages",
|
||||||
"CertFilePath": "",
|
"CertFilePath": "",
|
||||||
"CertPassword": ""
|
"CertPassword": ""
|
||||||
},
|
},
|
||||||
@@ -49,16 +49,17 @@ public void ConfigureServices(IServiceCollection services)
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
4. In your controller actions, [call .SaveChangesAsync() when you're done making changes](https://github.com/JudahGabriel/RavenDB.Identity/blob/master/Samples/RazorPages/Filters/RavenSaveChangesAsyncFilter.cs#L35). Typically this is done via a [RavenController base class](https://github.com/JudahGabriel/RavenDB.Identity/blob/master/Samples/Mvc/Controllers/RavenController.cs) for MVC/WebAPI projects or via an action filter or a [page filter](https://github.com/JudahGabriel/RavenDB.Identity/blob/master/Samples/RazorPages/Filters/RavenSaveChangesAsyncFilter.cs) for Razor Pages projects.
|
4. In your controller actions, [call .SaveChangesAsync() when you're done making changes](https://github.com/JudahGabriel/RavenDB.Identity/blob/master/Samples/RazorPages/Filters/RavenSaveChangesAsyncFilter.cs#L35). Typically this is done via a [RavenController base class](https://github.com/JudahGabriel/RavenDB.Identity/blob/master/Samples/Mvc/Controllers/RavenController.cs) for MVC/WebAPI projects or via a [page filter](https://github.com/JudahGabriel/RavenDB.Identity/blob/master/Samples/RazorPages/Filters/RavenSaveChangesAsyncFilter.cs) for Razor Pages projects.
|
||||||
|
|
||||||
## Modifying RavenDB conventions
|
## Modifying RavenDB conventions
|
||||||
|
|
||||||
To modify RavenDB conventions, you can use the `services.AddRavenDbDocStore(options)` overload:
|
Need to modify RavenDB conventions? You can use the `services.AddRavenDbDocStore(options)` overload:
|
||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
services.AddRavenDbDocStore(options =>
|
services.AddRavenDbDocStore(options =>
|
||||||
{
|
{
|
||||||
options.BeforeInitializeDocStore = docStore => docStore.Conventions.IdentityPartsSeparator = "-";
|
// Maybe we want to change the identity parts separator.
|
||||||
|
options.BeforeInitializeDocStore = docStore => docStore.Conventions.IdentityPartsSeparator = "-";
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
Reference in New Issue
Block a user