Click here to Skip to main content
14,635,442 members
Home » Discussions » Visual Basic
   

Visual Basic

 
GeneralRe: Force entity framework to load new data from database without disposing the context Pin
desanti2-Apr-19 9:22
Memberdesanti2-Apr-19 9:22 
GeneralRe: Force entity framework to load new data from database without disposing the context Pin
Dave Kreskowiak2-Apr-19 11:24
mveDave Kreskowiak2-Apr-19 11:24 
GeneralRe: Force entity framework to load new data from database without disposing the context Pin
desanti3-Apr-19 5:01
Memberdesanti3-Apr-19 5:01 
GeneralRe: Force entity framework to load new data from database without disposing the context Pin
Dave Kreskowiak3-Apr-19 7:22
mveDave Kreskowiak3-Apr-19 7:22 
GeneralRe: Force entity framework to load new data from database without disposing the context Pin
desanti3-Apr-19 8:23
Memberdesanti3-Apr-19 8:23 
GeneralRe: Force entity framework to load new data from database without disposing the context Pin
Dave Kreskowiak3-Apr-19 8:57
mveDave Kreskowiak3-Apr-19 8:57 
GeneralRe: Force entity framework to load new data from database without disposing the context Pin
desanti3-Apr-19 9:40
Memberdesanti3-Apr-19 9:40 
GeneralRe: Force entity framework to load new data from database without disposing the context Pin
Dave Kreskowiak3-Apr-19 10:30
mveDave Kreskowiak3-Apr-19 10:30 
desanti wrote:
hat if the local data is modified and they try to load from database , the local cache will be overwritten

So is that behavior desirable in all applications and situations? Nope.

So how do you configure that behavior in code, and all possible variants? Like either keeping the modified data, dumping all the modified data, or just keeping some of it and replacing the rest, or replacing some of it based on rules, or dumping some of it based on rules, ... there's too many possibilities to list... And that's the exact reason why it doesn't show up in ORM's.

You're trying to get EF, and ORM's in general, to do something that is best left up to the coder. Hell, that's even what you said in your previous post!

By the way, your analogy doesn't even apply to this.

GeneralRe: Force entity framework to load new data from database without disposing the context Pin
desanti3-Apr-19 11:16
Memberdesanti3-Apr-19 11:16 
GeneralRe: Force entity framework to load new data from database without disposing the context Pin
desanti4-Apr-19 0:41
Memberdesanti4-Apr-19 0:41 
GeneralRe: Force entity framework to load new data from database without disposing the context Pin
Dave Kreskowiak4-Apr-19 5:49
mveDave Kreskowiak4-Apr-19 5:49 
GeneralRe: Force entity framework to load new data from database without disposing the context Pin
desanti4-Apr-19 6:18
Memberdesanti4-Apr-19 6:18 
GeneralRe: Force entity framework to load new data from database without disposing the context Pin
Dave Kreskowiak4-Apr-19 9:22
mveDave Kreskowiak4-Apr-19 9:22 
Questioni want to import a text file to datatable or something like that Pin
Member 142077921-Apr-19 4:41
MemberMember 142077921-Apr-19 4:41 
AnswerRe: i want to import a text file to datatable or something like that Pin
David Mujica1-Apr-19 5:37
MemberDavid Mujica1-Apr-19 5:37 
GeneralRe: i want to import a text file to datatable or something like that Pin
Member 142077921-Apr-19 21:10
MemberMember 142077921-Apr-19 21:10 
AnswerRe: i want to import a text file to datatable or something like that Pin
Richard MacCutchan1-Apr-19 5:55
mveRichard MacCutchan1-Apr-19 5:55 
GeneralRe: i want to import a text file to datatable or something like that Pin
Member 142077921-Apr-19 21:08
MemberMember 142077921-Apr-19 21:08 
GeneralRe: i want to import a text file to datatable or something like that Pin
Richard MacCutchan1-Apr-19 21:20
mveRichard MacCutchan1-Apr-19 21:20 
GeneralRe: i want to import a text file to datatable or something like that Pin
Member 142077921-Apr-19 21:23
MemberMember 142077921-Apr-19 21:23 
QuestionDataGridView Mouse Hover Event Pin
Give me a break I'm new31-Mar-19 5:54
MemberGive me a break I'm new31-Mar-19 5:54 
AnswerRe: DataGridView Mouse Hover Event Pin
speedbump9931-Mar-19 7:45
Memberspeedbump9931-Mar-19 7:45 
QuestionJust wondering it this code is safe. Thanks for input. MESSAGE CLOSED Pin
speedbump9927-Mar-19 2:22
Memberspeedbump9927-Mar-19 2:22 
SuggestionRe: Just wondering it this code is safe. Pin
Richard Deeming27-Mar-19 2:44
mveRichard Deeming27-Mar-19 2:44 
AnswerRe: Just wondering it this code is safe. Pin
Dave Kreskowiak27-Mar-19 3:02
mveDave Kreskowiak27-Mar-19 3:02 

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.