public CategoryApiController( IAsyncOfmRepository <CategoryOfmForGet, int> asyncOfmRepository, IUrlHelper urlHelper, IHttpContextAccessor httpContextAccesor) { _asyncOfmRepository = asyncOfmRepository; _shortCamelCasedControllerName = nameof(CategoryApiController).ToShortCamelCasedControllerName(); _urlHelper = urlHelper; _controllerGuardClause = new ControllerGuardClauses <CategoryOfmForGet, CategoryOfmForPost, CategoryOfmForPatch, int>(this); _hateoasLinkFactory = new HateoasLinkFactory <int>(_urlHelper, nameof(CategoryApiController)); _incomingHeaders = Mapper.Map <IncomingHeaders>(httpContextAccesor.HttpContext.Items[nameof(IncomingRawHeaders)] as IncomingRawHeaders); }