The Entity Framework DbContext (or LINQ-to-SQL DataContext) is a Unit Of Work implementation. That means that the same DbContext should be used for all operations (both reading and writing) within a single web or service request. That means that there are a lot of different places where the DbContext have to be accessed. To avoid… Continue reading Make the DbContext Ambient with UnitOfWorkScope
Tag: Dependency Injection
Application Code vs Library Code
When writing code I think that it is important to keep in mind what type of code it is. Far too often, I see people writing very complicated structures without the need. I think that a reason for this is that the code was inspired from some library. Unless reading other people’s code for fun,… Continue reading Application Code vs Library Code