如果很多人(比如说 10,000 人)试图通过实体框架同时“写入”到 DB(SQL Server)中的同一个特定表,会发生什么?
If you mean inserting to the same table those insert will be processed based on transaction isolation level in the database. Usually only single transaction can hold a lock for insertion so inserts are processed in sequence (it has nothing to do with EF). Having 10.000 users concurrently inserting doesn't seem like sustainable architecture - some of them may timeout.
In my project i have modules and for decoupling reasons i using
singleton class (ModulesManager) which should take Action from each
module and execute it asynchronous like following:
Your manager asynchronously invokes the action so the answer is mostly dependent on what the action is doing. If it opens its own context, performs some changes and saves them, you should not have any technical problem on EF side.
Does Entity Framework can provide same speed as using SQL queries ?
不会。EF 会进行额外的处理,因此它总是会变慢。