Skip to content

Multiple Active Result Sets (MARS) and object graph in Csla #2974

Discussion options

You must be logged in to vote

ADO.NET has never been threadsafe. Microsoft has kept ADO.NET up to date as they've added async/await to the .NET framework and .NET Core, so I don't think this is a real worry.

Basically, if you aren't manually creating threads using Task.Run or something like that, and you aren't somehow defeating all the protections against sharing a single database connection across multiple server calls, it should work fine.

In CSLA 6 this means injecting the database connection into your DAL as a scoped service, which is normal. ASP.NET and CSLA work to ensure each server request has its own scope, and therefore has its own database connection.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@Chicagoan2016
Comment options

@TheCakeMonster
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by Chicagoan2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants