From a5b7a4750584a8ea3d65a7c3a8c54de82419c4aa Mon Sep 17 00:00:00 2001 From: Judah Gabriel Himango Date: Wed, 26 Jun 2019 12:04:04 -0500 Subject: [PATCH] Documentation formatting fix. --- Samples/Mvc/Readme.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Samples/Mvc/Readme.md b/Samples/Mvc/Readme.md index 4cba417..a4bed10 100644 --- a/Samples/Mvc/Readme.md +++ b/Samples/Mvc/Readme.md @@ -50,26 +50,26 @@ While we could call `.SaveChangesAsync()` in every controller action, that is te ```csharp /// - /// A controller that calls DbSession.SaveChangesAsync() when an action finishes executing successfully. - /// - public class RavenController : Controller +/// A controller that calls DbSession.SaveChangesAsync() when an action finishes executing successfully. +/// +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