Welles
Explore posts from serversFastest way to change all items in a nested list
Hi there, regex was an option. The jsonstring will always be single line. However not sure there is much performance gain using regex over for loops.
I just don’t like to see nested for loops, but in machine code for loops are actually pretty fast, so this might just be the best solution. Thanks!
8 replies
.net core webapi2 API key authorization
Well it is custom middleware to check the api key against the database. My app is not public, api is only for local use but still wanted to learn.
So at the moment using a middleware that is calling a function in a singleton service
44 replies
asp.net core services initialization
Ok gotcha, it's a lot to get my head around. Need to figure out to just not make it all a singleton and then use AddDbContextFactory instead of normal dbcontext which is scoped by default.
A lot of things to figure out
32 replies
asp.net core services initialization
but I don't see how this could work if I don't inject cardanofactory instead of cardanoservice in my controller.
When does the createAsync method gets triggered? On requests?
And I was also thinking, if scoped services are default with asp.net core stuff, isn't that like horrible for performance it needs to contruct each time a requests comes in?
32 replies