Calling service/repository methods in ASP.Net Core middleware
ASP.Net Core noob here...I am using an ASP.Net Core WebAPI core project using DNX451 with EF 6. I have a requirement to implement API Key auth in our service. To do this I have created middleware that gets information from the request and proceeds with authentication. It is SUPPOSED to go to the database, get the key to match, and then return and do the validation. Here is the middleware implemented to look at the context and get the APIKey AuthenticationHandler public class AuthorizationHandler { private readonly RequestDelegate _next; private IAuthenticationService _authenticationService;