asp.net - Simultaneously writing to same table with Entity Framework -


developing web site (using entity framework) have encountered in following questions:

1.what happens if lot (lets 10,000) people trying "to write" simultaneously same specific table in db (sql server) via entity framework ?

2.in project have modules , decoupling reasons using singleton class (modulesmanager) should take action each module , execute asynchronous following:

    public void insertnewrecord(action addnewrecordaction)     {         if (addnewrecordaction != null)         {             addnewrecordaction.begininvoke(recordcallback, null);         }     } 

is approach use singleton class place responsible write db ?

3.does entity framework can provide same speed using sql queries ?

what happens if lot (lets 10,000) people trying "to write" simultaneously same specific table in db (sql server) via entity framework ?

if mean inserting same table insert processed based on transaction isolation level in database. single transaction can hold lock insertion inserts processed in sequence (it has nothing ef). having 10.000 users concurrently inserting doesn't seem sustainable architecture - of them may timeout.

in project have modules , decoupling reasons using singleton class (modulesmanager) should take action each module , execute asynchronous following:

your manager asynchronously invokes action answer dependent on action doing. if opens own context, performs changes , saves them, should not have technical problem on ef side.

does entity framework can provide same speed using sql queries ?

no. ef additional processing slower.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -