views:

155

answers:

1

i am a newbie to Object oriented programming. I have spent 8 years as a procedural programmer. Even though Linq to Sql might not be a good choice going forward, it is still a good lightweight ORM. If I want to use LTS as my data access, and I have a MVP Pattern for my UI, than my question is as follows

In an MVP Pattern you typically create a Presenter for each view. Now suppose one of my views has two Unit of work in play. Say I have a customer edit screen as one UOW and a Order Order detail screen on the same page as my other UOW. My thinking is that I have two presenters here that has reference to DataContext to support Optimistic Concurrency. Is this a typical thing to do in Enterprise Applications?

A: 

It sounds like you got it right.

If you want to get a better feel for the pattern, you can check out the free book chapter from the NerdDinner project [at http://weblogs.asp.net/scottgu/archive/2009/03/10/free-asp-net-mvc-ebook-tutorial.aspx][1]

[1]: at http://weblogs.asp.net/scottgu/archive/2009/03/10/free-asp-net-mvc-ebook-tutorial.aspx

Robert Harvey