Click here to Skip to main content
15,886,919 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
GeneralRe: Managing concurrency in Linq/SQL Pin
Dave Kreskowiak12-Oct-18 2:01
mveDave Kreskowiak12-Oct-18 2:01 
PraiseRe: Managing concurrency in Linq/SQL Pin
R191112-Oct-18 2:56
R191112-Oct-18 2:56 
AnswerRe: Managing concurrency in Linq/SQL Pin
Eddy Vluggen11-Oct-18 4:52
professionalEddy Vluggen11-Oct-18 4:52 
GeneralRe: Managing concurrency in Linq/SQL Pin
R191111-Oct-18 19:46
R191111-Oct-18 19:46 
AnswerRe: Managing concurrency in Linq/SQL Pin
R191111-Oct-18 20:07
R191111-Oct-18 20:07 
GeneralRe: Managing concurrency in Linq/SQL Pin
Eddy Vluggen12-Oct-18 0:20
professionalEddy Vluggen12-Oct-18 0:20 
GeneralRe: Managing concurrency in Linq/SQL Pin
R191112-Oct-18 2:59
R191112-Oct-18 2:59 
GeneralRe: Managing concurrency in Linq/SQL Pin
Pete O'Hanlon12-Oct-18 3:20
mvePete O'Hanlon12-Oct-18 3:20 
He's not being sarcastic. You are mixing two cases here:

The first case is handled through transactions which is where two records attempt to update the same record at the same time.

The second case requires more of an end user experience type of mindset and relates to the question, what happens when you have two people editing the same record but they save at different times? Consider a stock trading application. You ring trader A and tell him you want to sell a million dollars of stock. So, he gets your stock up and enters a sell order for a million dollars but then gets distracted. Now, you're watching the market and you see that selling that much stock is going to be a bad idea and you also see that you haven't sold it yet so you ring up the same trading company but get put through to trader B instead. Now, you tell trader B to just sell half a million dollars of this stock. That trader gets up the stock, sets it and processes the order and you have just sold half a million. Now trader A comes back from his very enjoyable lunch and notices that he hasn't placed the order so he presses Sell. What happens next is hugely important.

If your application treats each "transaction" atomically and just processes it, you have just sold 1.5 million dollars of stock when you only wanted to sell 1/2 a million. If your system is clever and checks the updates, it detects that another transaction has occurred after you started and prompts you. Hopefully this causes you to ring the customer and check whether they wanted to sell 1/2, 1 or 1 1/2 dollars of stock.

That's what Eddy was getting at.
This space for rent

GeneralRe: Managing concurrency in Linq/SQL Pin
R191112-Oct-18 3:35
R191112-Oct-18 3:35 
GeneralRe: Managing concurrency in Linq/SQL Pin
Eddy Vluggen12-Oct-18 5:26
professionalEddy Vluggen12-Oct-18 5:26 
GeneralRe: Managing concurrency in Linq/SQL Pin
R191114-Oct-18 20:11
R191114-Oct-18 20:11 
GeneralRe: Managing concurrency in Linq/SQL Pin
Eddy Vluggen15-Oct-18 0:30
professionalEddy Vluggen15-Oct-18 0:30 
AnswerRe: Managing concurrency in Linq/SQL Pin
Mycroft Holmes12-Oct-18 13:36
professionalMycroft Holmes12-Oct-18 13:36 
GeneralRe: Managing concurrency in Linq/SQL Pin
R191113-Oct-18 21:18
R191113-Oct-18 21:18 
QuestionEntity Framework in agile environment Pin
dan!sh 21-Aug-18 23:23
professional dan!sh 21-Aug-18 23:23 
AnswerRe: Entity Framework in agile environment Pin
Nathan Minier22-Aug-18 1:30
professionalNathan Minier22-Aug-18 1:30 
GeneralRe: Entity Framework in agile environment Pin
dan!sh 22-Aug-18 2:00
professional dan!sh 22-Aug-18 2:00 
GeneralRe: Entity Framework in agile environment Pin
Nathan Minier22-Aug-18 2:05
professionalNathan Minier22-Aug-18 2:05 
GeneralRe: Entity Framework in agile environment Pin
dan!sh 22-Aug-18 2:11
professional dan!sh 22-Aug-18 2:11 
AnswerRe: Entity Framework in agile environment Pin
Mycroft Holmes22-Aug-18 12:27
professionalMycroft Holmes22-Aug-18 12:27 
GeneralRe: Entity Framework in agile environment Pin
dan!sh 22-Aug-18 18:43
professional dan!sh 22-Aug-18 18:43 
GeneralRe: Entity Framework in agile environment Pin
Mycroft Holmes23-Aug-18 12:12
professionalMycroft Holmes23-Aug-18 12:12 
GeneralRe: Entity Framework in agile environment Pin
jschell23-Aug-18 14:24
jschell23-Aug-18 14:24 
AnswerRe: Entity Framework in agile environment Pin
jschell23-Aug-18 14:27
jschell23-Aug-18 14:27 
GeneralRe: Entity Framework in agile environment Pin
dan!sh 23-Aug-18 20:10
professional dan!sh 23-Aug-18 20:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.