How is Database "Locking" Handled?


I have a scenario like the following: many people enter a game at the same time, but the game is limited to 100 players. Given that example, how would I handle these two steps?:

1: Querying entry count to ensure it isn’t too large
2: Adding a player to the database’s entry collection

Using a traditional database with Entity Framework, I would just wrap it in a transaction scope, but I’m not sure about Squidex.

I’m using the .NET library.

You need another schema where you just save the count. You can then query the count first and increment using optimistic concurrency (not supported by .NET library right now) to increment the value. When it succeeds you add an entry to your player list or you retry.

Is there any workaround I can use in C# right now? Not sure how I would use that in conjunction with the. NET library.