Click here to Skip to main content
15,916,693 members
Home / Discussions / ASP.NET
   

ASP.NET

 
SuggestionRe: ASP.Net MVC: custom client side validation for checkboxes is not working Pin
Richard Deeming29-Mar-16 2:17
mveRichard Deeming29-Mar-16 2:17 
QuestionWHere to put JavaScrip in ASP.net Pin
hmanhha26-Mar-16 8:33
hmanhha26-Mar-16 8:33 
AnswerRe: WHere to put JavaScrip in ASP.net Pin
F-ES Sitecore27-Mar-16 5:02
professionalF-ES Sitecore27-Mar-16 5:02 
GeneralRe: WHere to put JavaScrip in ASP.net Pin
hmanhha28-Mar-16 7:22
hmanhha28-Mar-16 7:22 
GeneralRe: WHere to put JavaScrip in ASP.net Pin
F-ES Sitecore28-Mar-16 7:38
professionalF-ES Sitecore28-Mar-16 7:38 
QuestionMVC5 WebGrid styling issues Pin
#realJSOP24-Mar-16 3:22
professional#realJSOP24-Mar-16 3:22 
AnswerRe: MVC5 WebGrid styling issues Pin
#realJSOP24-Mar-16 7:26
professional#realJSOP24-Mar-16 7:26 
AnswerRe: MVC5 WebGrid styling issues Pin
#realJSOP24-Mar-16 7:48
professional#realJSOP24-Mar-16 7:48 
GeneralRe: MVC5 WebGrid styling issues Pin
Brisingr Aerowing24-Mar-16 17:10
professionalBrisingr Aerowing24-Mar-16 17:10 
GeneralRe: MVC5 WebGrid styling issues Pin
#realJSOP25-Mar-16 0:47
professional#realJSOP25-Mar-16 0:47 
GeneralRe: MVC5 WebGrid styling issues Pin
Brisingr Aerowing25-Mar-16 4:41
professionalBrisingr Aerowing25-Mar-16 4:41 
QuestionMVC/EF typical/best practice Pin
#realJSOP24-Mar-16 1:21
professional#realJSOP24-Mar-16 1:21 
AnswerRe: MVC/EF typical/best practice Pin
Nathan Minier24-Mar-16 1:37
professionalNathan Minier24-Mar-16 1:37 
God, no.

There are a few schools of though as to the appropriate use of DbContexts. The two that make the most sense to me are that you separate the models into domains and use a context per model domain, and the other is that you have a DbContext for each separate database. I prefer the latter, unless your object count bloats obscenely.

The important part is that the DbContext implements both the repository and UoW patterns, so design it as you would any repository and use it as a UoW.

The primary guidance that the Ef design team has always espoused is that only the first instance of a particular DbContext has much cost, after that the model has been generated and any further instances are cheap.

I hope that helps.

GeneralRe: MVC/EF typical/best practice Pin
#realJSOP24-Mar-16 2:02
professional#realJSOP24-Mar-16 2:02 
GeneralRe: MVC/EF typical/best practice Pin
Nathan Minier24-Mar-16 2:08
professionalNathan Minier24-Mar-16 2:08 
GeneralRe: MVC/EF typical/best practice Pin
John C Rayan24-Mar-16 5:27
professionalJohn C Rayan24-Mar-16 5:27 
GeneralRe: MVC/EF typical/best practice Pin
Richard Deeming24-Mar-16 2:14
mveRichard Deeming24-Mar-16 2:14 
GeneralRe: MVC/EF typical/best practice Pin
Nathan Minier24-Mar-16 2:31
professionalNathan Minier24-Mar-16 2:31 
QuestionWhat wrong with my website Pin
hmanhha23-Mar-16 22:03
hmanhha23-Mar-16 22:03 
AnswerRe: What wrong with my website Pin
John C Rayan23-Mar-16 23:48
professionalJohn C Rayan23-Mar-16 23:48 
AnswerRe: What wrong with my website Pin
#realJSOP24-Mar-16 1:18
professional#realJSOP24-Mar-16 1:18 
GeneralRe: What wrong with my website Pin
hmanhha24-Mar-16 16:06
hmanhha24-Mar-16 16:06 
Questioncombining rewrite maps with an update panel Pin
Member 1061132123-Mar-16 6:37
Member 1061132123-Mar-16 6:37 
AnswerRe: combining rewrite maps with an update panel Pin
John C Rayan24-Mar-16 0:08
professionalJohn C Rayan24-Mar-16 0:08 
GeneralRe: combining rewrite maps with an update panel Pin
Member 1061132124-Mar-16 3:19
Member 1061132124-Mar-16 3:19 

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.