diff --git a/src/Bagombo.Data/Command/EFCoreCommandHandlers/AddFeatureCommandEFCommandHandler.cs b/src/Bagombo.Data/Command/EFCoreCommandHandlers/AddFeatureCommandEFCommandHandler.cs index fa45267..a6f3e46 100644 --- a/src/Bagombo.Data/Command/EFCoreCommandHandlers/AddFeatureCommandEFCommandHandler.cs +++ b/src/Bagombo.Data/Command/EFCoreCommandHandlers/AddFeatureCommandEFCommandHandler.cs @@ -8,13 +8,10 @@ namespace Bagombo.Data.Command.EFCoreCommandHandlers { - public class AddFeatureCommandEFCommandHandler : ICommandHandlerAsync + public class AddFeatureCommandEFCommandHandler : EFCHBase, ICommandHandlerAsync { - private BlogDbContext _context; - - public AddFeatureCommandEFCommandHandler(BlogDbContext context) + public AddFeatureCommandEFCommandHandler(BlogDbContext context) : base(context) { - _context = context; } public async Task> ExecuteAsync(AddFeatureCommand command) diff --git a/src/Bagombo.Data/Query/EFCoreQueryHandlers/GetAllPostsByCategoryViewModelEFQH.cs b/src/Bagombo.Data/Query/EFCoreQueryHandlers/GetAllPostsByCategoryViewModelEFQH.cs index db0c870..e8a5b0a 100644 --- a/src/Bagombo.Data/Query/EFCoreQueryHandlers/GetAllPostsByCategoryViewModelEFQH.cs +++ b/src/Bagombo.Data/Query/EFCoreQueryHandlers/GetAllPostsByCategoryViewModelEFQH.cs @@ -10,13 +10,10 @@ namespace Bagombo.Data.Query.EFCoreQueryHandlers { - public class GetAllPostsByCategoryViewModelEFQH : IQueryHandlerAsync + public class GetAllPostsByCategoryViewModelEFQH : EFQHBase, IQueryHandlerAsync { - private BlogDbContext _context; - - public GetAllPostsByCategoryViewModelEFQH(BlogDbContext context) + public GetAllPostsByCategoryViewModelEFQH(BlogDbContext context) : base(context) { - _context = context; } public async Task HandleAsync(GetAllPostsByCategoryViewModelQuery query) diff --git a/src/Bagombo.Data/Query/EFCoreQueryHandlers/GetAllPostsByDateViewModelEFQH.cs b/src/Bagombo.Data/Query/EFCoreQueryHandlers/GetAllPostsByDateViewModelEFQH.cs index 2b855a3..caf5d23 100644 --- a/src/Bagombo.Data/Query/EFCoreQueryHandlers/GetAllPostsByDateViewModelEFQH.cs +++ b/src/Bagombo.Data/Query/EFCoreQueryHandlers/GetAllPostsByDateViewModelEFQH.cs @@ -10,13 +10,10 @@ namespace Bagombo.Data.Query.EFCoreQueryHandlers { - public class GetAllPostsByDateViewModelEFQH : IQueryHandlerAsync + public class GetAllPostsByDateViewModelEFQH : EFQHBase, IQueryHandlerAsync { - BlogDbContext _context; - - public GetAllPostsByDateViewModelEFQH(BlogDbContext context) + public GetAllPostsByDateViewModelEFQH(BlogDbContext context) : base(context) { - _context = context; } public async Task HandleAsync(GetAllPostsByDateViewModelQuery query) diff --git a/src/Bagombo.Data/Query/EFCoreQueryHandlers/GetBlogPostByIdViewModelEFQH.cs b/src/Bagombo.Data/Query/EFCoreQueryHandlers/GetBlogPostByIdViewModelEFQH.cs index 9a6395b..e180744 100644 --- a/src/Bagombo.Data/Query/EFCoreQueryHandlers/GetBlogPostByIdViewModelEFQH.cs +++ b/src/Bagombo.Data/Query/EFCoreQueryHandlers/GetBlogPostByIdViewModelEFQH.cs @@ -10,13 +10,10 @@ namespace Bagombo.Data.Query.EFCoreQueryHandlers { - public class GetBlogPostByIdViewModelEFQH : IQueryHandlerAsync + public class GetBlogPostByIdViewModelEFQH : EFQHBase, IQueryHandlerAsync { - BlogDbContext _context; - - public GetBlogPostByIdViewModelEFQH(BlogDbContext context) + public GetBlogPostByIdViewModelEFQH(BlogDbContext context) : base(context) { - _context = context; } public async Task HandleAsync(GetBlogPostByIdViewModelQuery query) diff --git a/src/Bagombo.Data/Query/EFCoreQueryHandlers/GetCategoryPostsByCategoryViewModelEFQH.cs b/src/Bagombo.Data/Query/EFCoreQueryHandlers/GetCategoryPostsByCategoryViewModelEFQH.cs index 6a93211..271afe7 100644 --- a/src/Bagombo.Data/Query/EFCoreQueryHandlers/GetCategoryPostsByCategoryViewModelEFQH.cs +++ b/src/Bagombo.Data/Query/EFCoreQueryHandlers/GetCategoryPostsByCategoryViewModelEFQH.cs @@ -10,13 +10,10 @@ namespace Bagombo.Data.Query.EFCoreQueryHandlers { - public class GetCategoryPostsByCategoryViewModelEFQH : IQueryHandlerAsync + public class GetCategoryPostsByCategoryViewModelEFQH : EFQHBase, IQueryHandlerAsync { - private BlogDbContext _context; - - public GetCategoryPostsByCategoryViewModelEFQH(BlogDbContext context) + public GetCategoryPostsByCategoryViewModelEFQH(BlogDbContext context) : base(context) { - _context = context; } public async Task HandleAsync(GetCategoryPostsByCategoryViewModelQuery query) diff --git a/src/Bagombo.Data/Query/EFCoreQueryHandlers/GetFeatureByIdEFQH.cs b/src/Bagombo.Data/Query/EFCoreQueryHandlers/GetFeatureByIdEFQH.cs index 50e4849..5830934 100644 --- a/src/Bagombo.Data/Query/EFCoreQueryHandlers/GetFeatureByIdEFQH.cs +++ b/src/Bagombo.Data/Query/EFCoreQueryHandlers/GetFeatureByIdEFQH.cs @@ -9,13 +9,10 @@ namespace Bagombo.Data.Query.EFCoreQueryHandlers { - public class GetFeatureByIdEFQH : IQueryHandlerAsync + public class GetFeatureByIdEFQH : EFQHBase, IQueryHandlerAsync { - private BlogDbContext _context; - - public GetFeatureByIdEFQH(BlogDbContext context) + public GetFeatureByIdEFQH(BlogDbContext context) : base(context) { - _context = context; } public async Task HandleAsync(GetFeatureByIdQuery query) diff --git a/src/Bagombo.Data/Query/EFCoreQueryHandlers/GetFeaturePostsByFeatureViewModelEFQH.cs b/src/Bagombo.Data/Query/EFCoreQueryHandlers/GetFeaturePostsByFeatureViewModelEFQH.cs index d02a38b..ba5344d 100644 --- a/src/Bagombo.Data/Query/EFCoreQueryHandlers/GetFeaturePostsByFeatureViewModelEFQH.cs +++ b/src/Bagombo.Data/Query/EFCoreQueryHandlers/GetFeaturePostsByFeatureViewModelEFQH.cs @@ -10,13 +10,10 @@ namespace Bagombo.Data.Query.EFCoreQueryHandlers { - class GetFeaturePostsByFeatureViewModelEFQH : IQueryHandlerAsync + class GetFeaturePostsByFeatureViewModelEFQH : EFQHBase, IQueryHandlerAsync { - BlogDbContext _context; - - public GetFeaturePostsByFeatureViewModelEFQH(BlogDbContext context) + public GetFeaturePostsByFeatureViewModelEFQH(BlogDbContext context) : base(context) { - _context = context; } public async Task HandleAsync(GetFeaturePostsByFeatureViewModelQuery query) diff --git a/src/Bagombo.Data/Query/EFCoreQueryHandlers/GetFeaturesViewModelEFQH.cs b/src/Bagombo.Data/Query/EFCoreQueryHandlers/GetFeaturesViewModelEFQH.cs index f066f48..868b436 100644 --- a/src/Bagombo.Data/Query/EFCoreQueryHandlers/GetFeaturesViewModelEFQH.cs +++ b/src/Bagombo.Data/Query/EFCoreQueryHandlers/GetFeaturesViewModelEFQH.cs @@ -10,13 +10,10 @@ namespace Bagombo.Data.Query.EFCoreQueryHandlers { - public class GetFeaturesViewModelEFQH : IQueryHandlerAsync + public class GetFeaturesViewModelEFQH : EFQHBase, IQueryHandlerAsync { - BlogDbContext _context; - - public GetFeaturesViewModelEFQH(BlogDbContext context) + public GetFeaturesViewModelEFQH(BlogDbContext context) : base(context) { - _context = context; } public async Task HandleAsync(GetFeaturesViewModelQuery query) diff --git a/src/Bagombo.Data/Query/EFCoreQueryHandlers/GetRecentBlogPostsEFQH.cs b/src/Bagombo.Data/Query/EFCoreQueryHandlers/GetRecentBlogPostsEFQH.cs index 27366df..2b3241c 100644 --- a/src/Bagombo.Data/Query/EFCoreQueryHandlers/GetRecentBlogPostsEFQH.cs +++ b/src/Bagombo.Data/Query/EFCoreQueryHandlers/GetRecentBlogPostsEFQH.cs @@ -10,13 +10,10 @@ namespace Bagombo.Data.Query.EFCoreQueryHandlers { - public class GetRecentBlogPostsEFQH : IQueryHandlerAsync> + public class GetRecentBlogPostsEFQH : EFQHBase, IQueryHandlerAsync> { - private BlogDbContext _context; - - public GetRecentBlogPostsEFQH(BlogDbContext context) + public GetRecentBlogPostsEFQH(BlogDbContext context) : base(context) { - _context = context; } public async Task> HandleAsync(GetRecentBlogPostsQuery query) diff --git a/src/Bagombo.Data/Query/EFCoreQueryHandlers/GetSearchResultBlogPostsBySearchTextViewModelEFQH.cs b/src/Bagombo.Data/Query/EFCoreQueryHandlers/GetSearchResultBlogPostsBySearchTextViewModelEFQH.cs index 36c7f69..68c771e 100644 --- a/src/Bagombo.Data/Query/EFCoreQueryHandlers/GetSearchResultBlogPostsBySearchTextViewModelEFQH.cs +++ b/src/Bagombo.Data/Query/EFCoreQueryHandlers/GetSearchResultBlogPostsBySearchTextViewModelEFQH.cs @@ -11,13 +11,10 @@ namespace Bagombo.Data.Query.EFCoreQueryHandlers { - public class GetSearchResultBlogPostsBySearchTextViewModelEFQH : IQueryHandlerAsync> + public class GetSearchResultBlogPostsBySearchTextViewModelEFQH : EFQHBase, IQueryHandlerAsync> { - BlogDbContext _context; - - public GetSearchResultBlogPostsBySearchTextViewModelEFQH(BlogDbContext context) + public GetSearchResultBlogPostsBySearchTextViewModelEFQH(BlogDbContext context) : base(context) { - _context = context; } public async Task> HandleAsync(GetSearchResultBlogPostsBySearchTextViewModelQuery query) diff --git a/src/Bagombo/Controllers/AdminController.cs b/src/Bagombo/Controllers/AdminController.cs index df6bd27..bcf08f0 100644 --- a/src/Bagombo/Controllers/AdminController.cs +++ b/src/Bagombo/Controllers/AdminController.cs @@ -22,11 +22,11 @@ public class AdminController : Controller { private ICommandProcessorAsync _cp; private IQueryProcessorAsync _qpa; - UserManager _userManager; - SignInManager _signInManager; - IPasswordHasher _passwordHasher; - IUserValidator _userValidator; - IPasswordValidator _passwordValidator; + private UserManager _userManager; + private SignInManager _signInManager; + private IPasswordHasher _passwordHasher; + private IUserValidator _userValidator; + private IPasswordValidator _passwordValidator; public AdminController(ICommandProcessorAsync cp, IQueryProcessorAsync qpa, diff --git a/src/Bagombo/Controllers/AuthorController.cs b/src/Bagombo/Controllers/AuthorController.cs index 990a55e..9cc4e89 100644 --- a/src/Bagombo/Controllers/AuthorController.cs +++ b/src/Bagombo/Controllers/AuthorController.cs @@ -23,9 +23,9 @@ namespace Bagombo.Controllers [Authorize(Roles = "Authors")] public class AuthorController : Controller { - IQueryProcessorAsync _qpa; - ICommandProcessorAsync _cp; - UserManager _userManager; + private IQueryProcessorAsync _qpa; + private ICommandProcessorAsync _cp; + private UserManager _userManager; public AuthorController(IQueryProcessorAsync qpa, ICommandProcessorAsync cp,