0
epgeroy created
I need to secure some transactions cause I been having some duplicated entries.
the logic goes like
- is there some products
- get them!
- write on database that you got it (in another table) and wait for authorization (another use case)
I have understood that what I need is some database locks, also that with isolation level serialize each transaction starts to read when the prev transaction finishes writing.
- I used
using (
var scope = new TransactionScope(TransactionScopeOption.Required, new TransactionOptions
{IsolationLevel = IsolationLevel.Serializable}, TransactionScopeAsyncFlowOption.Enabled))
{
...
scope.Complete();
}
did'n work, still producing duplicated entry's
- I tried
Configuration.UnitOfWork.IsolationLevel = IsolationLevel.Serializable;
at the preinitializer on the Core module. Also did not work
this, among many non useful hacks that I found on internet
please, any help will be very appreciated. Thanks in advance
1 Answer(s)
-
0
Hi,
Did you tried unit of work for this ? <a class="postlink" href="http://aspnetboilerplate.com/Pages/Documents/Unit-Of-Work">http://aspnetboilerplate.com/Pages/Docu ... it-Of-Work</a>