π™‰π™žπ™˜π™ 
π™‰π™žπ™˜π™ 
CC#
Created by π™‰π™žπ™˜π™  on 4/30/2023 in #help
βœ… (Why) should you use SpaServices.Extensions?
Spaservices extensions allows you to put a spa like angular inside your .net api and publish it at the same time. But why would u want this? Wouldnt you want more seperation instead?
13 replies
CC#
Created by π™‰π™žπ™˜π™  on 9/24/2022 in #help
Access user claims + set attributes of called method in Global Query filter
Hello! I was wondering whether it is possible to access what API Controller & what method is called in the IHttpContextAccessor (when using it in a global query filter in the app its DbContext). + As well as all the attributes which are set above those controllers/methods. Both are very needed. I know I can access the users claims, but I need to know if and how I can access the method with its attributes of the request. If not with the ihttpcontextaccessor, is there any other way of doing this? (Basically: I would like to access my user’s claims (using the httpcontext). With that, I would like to check the [Attributes] set on the called method. Then I would like to filter if certain properties in both match, and based on that outcome, apply certain id(s) to filter for in the request. That’s also why I need it in a global query filter. I dont want to copypaste this code everywhere.)
3 replies