no >> body
✅ EF core transactions in PostgreSQL
Yeah, this is exactly what I thought about. If I don't need to read something before updating, then I don't need a transaction either.
I also have a place in my code where I create/delete something alongside with updating balances.
This still requires a transaction in case something fails, but I reckon I don't need it to be Serializable now
17 replies
✅ EF core transactions in PostgreSQL
Unfortunately, I haven't found a better way to implement retries with transactions in EF Core with PostgreSQL.
I believe I dug my own grave when I chose EF for that project. But it is what it is, the code is running already in production and I have to fix this issue with concurrent transactions.
Also,
FirstAsync
and ReloadAsync
didn't solve my problems. I still have issues with balances.17 replies
✅ EF core transactions in PostgreSQL
Hmm, I changed
FindAsync
to FirstAsync
and it looks like the problem is solved.
As far as I know Find
caches result, so It could use entity with not actual results.
Another approach to solve this was to add await context.Entry(walletBalance).ReloadAsync();
inside transaction body17 replies
❔ WebApplicationFactory and integration tests
Here's the tricky part: my
ConfigureAppConfiguration
is called after the Program.cs
so at the point when I need the connection strings, they are null. I tried to solve this by moving my configuration setup to IHostBuilder.ConfigureAppConfiguration
instead of IWebHostBuilder.ConfigureAppConfiguration
, but it didn't work. I feel like I'm missing something basic here. Any advice or pointers would be really appreciated. Thanks!3 replies
❔ ASP.NET Core authorization server in Kubernetes environment
I found this documentation and have tried to add the same code:
https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/proxy-load-balancer?view=aspnetcore-3.1#other-proxy-server-and-load-balancer-scenarios-1
After that the error changed and now I'm getting this:
18 replies