Click here to Skip to main content
15,890,123 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
GeneralRe: My Entity Framework Design Pin
Richard Deeming2-Jul-18 9:00
mveRichard Deeming2-Jul-18 9:00 
GeneralRe: My Entity Framework Design Pin
Kevin Marois2-Jul-18 10:15
professionalKevin Marois2-Jul-18 10:15 
GeneralRe: My Entity Framework Design Pin
Kevin Marois4-Jul-18 17:33
professionalKevin Marois4-Jul-18 17:33 
GeneralRe: My Entity Framework Design Pin
Richard Deeming5-Jul-18 1:27
mveRichard Deeming5-Jul-18 1:27 
GeneralRe: My Entity Framework Design Pin
Kevin Marois9-Jul-18 6:17
professionalKevin Marois9-Jul-18 6:17 
GeneralRe: My Entity Framework Design Pin
Kevin Marois9-Jul-18 6:19
professionalKevin Marois9-Jul-18 6:19 
GeneralRe: My Entity Framework Design Pin
Richard Deeming9-Jul-18 8:20
mveRichard Deeming9-Jul-18 8:20 
GeneralRe: My Entity Framework Design Pin
Kevin Marois16-Jul-18 6:28
professionalKevin Marois16-Jul-18 6:28 
I have another question on this. yes, I'm still confused. I'm reading a lot of articles and there's no end to the ways this is done.

Unit of Work I understand that EF already IS a Unit of Work. But I see a Unit of Work as a class that handles data operations for some task. For example, an Inventory system might have a Unit of Work that handles a customer purchasing something, which might do the following:
  • Check customer credit limit
  • Create an invoice header and details
  • Call the Inventory portion to ensure handle inventory issues
  • Call the shipping portion
In my mind all of these are 'housed' in one class called PlaceCustomerOrderUOW, and this class lives in the DAL. For every thing that needs to be done that is data -related, there would be a UOW to encapulate all the related work items together.

These UOW's would be the classes that actually create the repos, and the repos are the only classes that know about the DBContext.

So in my example above, the CustOrderController calls BizOb.PlaceCustomerOrder, which calls DAL.PlaceCustomerOrder, which creates the UOW above

The BizObject is really for ensuring business rules are applied - for example, check the customer's credit limit, check user rights, etc.

I'm curious what you think of this design.

Thanks
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.

GeneralRe: My Entity Framework Design Pin
Richard Deeming16-Jul-18 8:16
mveRichard Deeming16-Jul-18 8:16 
QuestionEntity Framework Question Pin
Kevin Marois29-Jun-18 9:31
professionalKevin Marois29-Jun-18 9:31 
AnswerRe: Entity Framework Question Pin
Richard Deeming29-Jun-18 10:02
mveRichard Deeming29-Jun-18 10:02 
AnswerRe: Entity Framework Question Pin
Gerry Schmitz29-Jun-18 11:01
mveGerry Schmitz29-Jun-18 11:01 
GeneralRe: Entity Framework Question Pin
Kevin Marois29-Jun-18 11:26
professionalKevin Marois29-Jun-18 11:26 
GeneralRe: Entity Framework Question Pin
Gerry Schmitz29-Jun-18 11:59
mveGerry Schmitz29-Jun-18 11:59 
AnswerRe: Entity Framework Question Pin
jschell30-Jun-18 5:35
jschell30-Jun-18 5:35 
AnswerRe: Entity Framework Question Pin
Mycroft Holmes30-Jun-18 13:23
professionalMycroft Holmes30-Jun-18 13:23 
QuestionQuestions About Entity Framework and the Repository Pattern Pin
Kevin Marois29-Jun-18 5:28
professionalKevin Marois29-Jun-18 5:28 
AnswerRe: Questions About Entity Framework and the Repository Pattern Pin
Nathan Minier29-Jun-18 7:34
professionalNathan Minier29-Jun-18 7:34 
GeneralRe: Questions About Entity Framework and the Repository Pattern Pin
Kevin Marois29-Jun-18 7:46
professionalKevin Marois29-Jun-18 7:46 
GeneralRe: Questions About Entity Framework and the Repository Pattern Pin
Nathan Minier29-Jun-18 8:03
professionalNathan Minier29-Jun-18 8:03 
GeneralRe: Questions About Entity Framework and the Repository Pattern Pin
Kevin Marois29-Jun-18 8:27
professionalKevin Marois29-Jun-18 8:27 
AnswerRe: Questions About Entity Framework and the Repository Pattern Pin
Gerry Schmitz29-Jun-18 10:38
mveGerry Schmitz29-Jun-18 10:38 
QuestionMEF based Web API Pin
Mycroft Holmes28-Jun-18 21:12
professionalMycroft Holmes28-Jun-18 21:12 
AnswerRe: MEF based Web API Pin
Nathan Minier29-Jun-18 7:15
professionalNathan Minier29-Jun-18 7:15 
GeneralRe: MEF based Web API Pin
Mycroft Holmes30-Jun-18 13:36
professionalMycroft Holmes30-Jun-18 13:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.