Documentation formatting fix.

This commit is contained in:
Judah Gabriel Himango
2019-06-26 12:04:04 -05:00
parent 962600435c
commit a5b7a47505
+14 -14
View File
@@ -50,26 +50,26 @@ While we could call `.SaveChangesAsync()` in every controller action, that is te
```csharp
/// <summary>
/// A controller that calls DbSession.SaveChangesAsync() when an action finishes executing successfully.
/// </summary>
public class RavenController : Controller
/// A controller that calls DbSession.SaveChangesAsync() when an action finishes executing successfully.
/// </summary>
public class RavenController : Controller
{
public RavenController(IAsyncDocumentSession dbSession)
{
public RavenController(IAsyncDocumentSession dbSession)
{
this.DbSession = DbSession;
}
this.DbSession = DbSession;
}
public IAsyncDocumentSession DbSession { get; private set; }
public IAsyncDocumentSession DbSession { get; private set; }
public override async Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next)
public override async Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next)
{
var executedContext = await next.Invoke();
if (executedContext.Exception == null)
{
var executedContext = await next.Invoke();
if (executedContext.Exception == null)
{
await DbSession.SaveChangesAsync();
}
await DbSession.SaveChangesAsync();
}
}
}
```
## 4. AccountController