The tag has no wiki summary.

learn more… | top users | synonyms

3
votes
1answer
56 views

Unit of Work Concurrency, how is it handled

I am reading some information about the Unit of Work pattern. There is one thing that is not very clear for me: what will happen when you request a couple of records on a thread (1) and another thread ...
0
votes
1answer
45 views

How to save entities relations using unit of work pattern

I use Unit of work pattern to commit all new, dirty, deleted entities to the DB (using a db_mapper). Example of entities are: Student and Class So Student->registerDirty() will add this entity to ...
3
votes
1answer
125 views

Should I have separate units of work for each EF bounded context?

I have some EF bounded contexts like follows public class BoundedContext_1 : DbContext { IDbSet<A> As { get; set; } IDbSet<B> Bs { get; set; } } public class BoundedContext_2 : ...
2
votes
2answers
111 views

Communication/Updates between units of works/entity framework contexts, colliding with user changes

I'm developing a WPF application using Entity Framework for my database communication. The application has a hierarchy of tabs where each tab has a db context. Each tab allows the user to view some ...
0
votes
0answers
136 views

Save database changes in service layer or controller mvc .net

I have recently been using a service layer to abstract away alot of the business logic of my application. However I've come into an issue where I'm not sure what is best practice on doing the actual ...
2
votes
1answer
279 views

Would this be a correct way to use the Repository pattern in ASP .NET MVC application implementing Entity Framework?

This ASP .NET MVC application implements Entity Framework. I've declared the repositories in the DbContext like this: public class CompanyDbContext : DbContext { // constructor goes here ...
0
votes
1answer
177 views

Are there any concerns with using a static read-only unit of work so that it behaves like a cache?

Related question: How do I cache data that rarely changes? I'm making an ASP.NET MVC4 application. On every request the security details about the user will need to be checked with the ...
3
votes
4answers
351 views

Unit of Work pattern

I have gone through many articles and I am still confused whether to use the Unit of Work pattern or not. I use generic repositories (Repository Pattern) but if my understanding of the UOW pattern is ...
2
votes
2answers
2k views

Unit of work/repository pattern with dependency injection advice

I'm developing a series of repository classes and a UnitOfWork class (plus its IUnitOfWork interface of course). I'm using Castle Windsor, which injects dependencies via constructors. My business ...
43
votes
6answers
26k views

Why shouldn't I use the repository pattern with Entity Framework?

During a job interview, I was asked to explain why the repository pattern isn't a good pattern to work with ORMs like Entity Framework. Why is this the case?
3
votes
3answers
2k views

How to use the unit of work and repository patterns in a service oriented enviroment

I've created an application framework using the unit of work and repository patterns for it's data layer. Data consumer layers such as presentation depend on the data layer design. For example a CRUD ...
14
votes
2answers
6k views

Relationship between Repository and Unit of Work

I am going to implement a repository, and I would like to use the UOW pattern since the consumer of the repository could do several operations, and I want to commit them at once. After read several ...
4
votes
3answers
2k views

Unit of work principle is causing a problem in MVC3 application

I am implementing a website using MVC3, Entity Framework 4.1 and Repositoty pattern, Unit of work principle. But I am facing a big problem while implementing this. I have developed a static ...
0
votes
2answers
1k views

Why is the Unit of Work pattern considered fast and efficient when working with an ORM?

In working with Doctrine 2 I came across the following paragraph. In fact, since Doctrine is aware of all your managed entities, when you call theflush() method, it calculates an overall ...
6
votes
1answer
114 views

Data services methods naming

When you work with ORM which implement UnitOfWork pattern (NHibernate's Session, Entity Framework's ObjectContext, etc.), there are two types of data services methods: those which save/commit changes ...