how to implement unitofwork pattern when using subsonic 2.1(Repository pattern) ?
Posted
by ROHITH
on Stack Overflow
See other posts from Stack Overflow
or by ROHITH
Published on 2010-05-22T05:31:57Z
Indexed on
2010/05/22
5:40 UTC
Read the original article
Hit count: 285
I am using subsonic repository pattern(2.1) for asp.net mvc application.In my application,there are many repositories like categoryRepository,Blogrepository etc.Inside each of this repository i am calling subsonic's DB.Select().From()...ExecuteReader()
and then loading domain objects from those reader.
In the controller action i make multiple calls from these repositories for e.g.
List<IBlog> blogs=_blogRepository.GetHottestBlogs();
List<ICategory> categories=_categoryRepository.GetAll();
do i have to implement any unitofwork pattern for this ?.My doubt is that how subsonic performs each operation DB.Update/Insert/Select .Is a TransactionScope
is enough for batch update or do i have to use SharedDbConnectionScope
to get better performance?
© Stack Overflow or respective owner