Click here to Skip to main content
15,910,009 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
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 
If you only have a "few" entities, then one repository per entity is overkill IMO.

I wrap the whole DB context in a "repository" and tailor it to the "problem"; accessing specific entities "by name", like GetCustomer(id); instead of resorting to "patterns and generics" that make the whole thing more obtuse.

"SaveChanges" saves the whole "context"; that's why a "centralized" save makes no sense. For "big" object graphs and "batch jobs", one wants to save at appropriate intervals to avoid one (big) update stream.

"Hanging" onto db contexts for a "long time" is also a problem (and bad habit) for most.

Creating new db contexts is "light-weight", and helps avoid memory leaks. The "data base calls" are what impacts performance.

The actual number of "unique" calls that one makes to an ORM is rather small and "self-documenting" code beats generics when you start solving "application problems" and having to apply "user terminology" change requests.

Generics are fine for "tools"; not business logic; and "use case" ORM queries, etc. fall under "business logic".

(EF gets bad-mouthed a lot because of all the "patterns" others want to apply and the (bad) results you wind up having to contend with; not due to some inherent defect in EF).

Writing "fewer" lines of code is not necessarily progress; or without future "debt".
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal


modified 29-Jun-18 16:45pm.

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 
QuestionPython-ic way of efficient TV player app architecture Pin
ninjaef27-Jun-18 0:06
ninjaef27-Jun-18 0:06 
AnswerRe: Python-ic way of efficient TV player app architecture Pin
Richard MacCutchan27-Jun-18 2:44
mveRichard MacCutchan27-Jun-18 2:44 
GeneralRe: Python-ic way of efficient TV player app architecture Pin
ninjaef27-Jun-18 4:36
ninjaef27-Jun-18 4:36 
GeneralRe: Python-ic way of efficient TV player app architecture Pin
Richard MacCutchan27-Jun-18 4:45
mveRichard MacCutchan27-Jun-18 4:45 
GeneralRe: Python-ic way of efficient TV player app architecture Pin
ninjaef27-Jun-18 5:15
ninjaef27-Jun-18 5:15 
GeneralRe: Python-ic way of efficient TV player app architecture Pin
ninjaef27-Jun-18 5:37
ninjaef27-Jun-18 5:37 
GeneralRe: Python-ic way of efficient TV player app architecture Pin
Richard MacCutchan27-Jun-18 6:22
mveRichard MacCutchan27-Jun-18 6:22 
AnswerRe: Python-ic way of efficient TV player app architecture Pin
Gerry Schmitz27-Jun-18 10:50
mveGerry Schmitz27-Jun-18 10:50 
GeneralRe: Python-ic way of efficient TV player app architecture Pin
ninjaef28-Jun-18 6:52
ninjaef28-Jun-18 6:52 
GeneralRe: Python-ic way of efficient TV player app architecture Pin
Richard MacCutchan28-Jun-18 6:54
mveRichard MacCutchan28-Jun-18 6:54 
GeneralRe: Python-ic way of efficient TV player app architecture Pin
ninjaef1-Jul-18 21:36
ninjaef1-Jul-18 21:36 
GeneralRe: Python-ic way of efficient TV player app architecture Pin
Richard MacCutchan1-Jul-18 21:53
mveRichard MacCutchan1-Jul-18 21:53 
GeneralRe: Python-ic way of efficient TV player app architecture Pin
ninjaef2-Jul-18 8:47
ninjaef2-Jul-18 8:47 
GeneralRe: Python-ic way of efficient TV player app architecture Pin
Richard Deeming28-Jun-18 7:44
mveRichard Deeming28-Jun-18 7:44 

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.