c# - Refresh entity framework view result -


i have in database view named vue_demande , need rows in application :

public ienumerable<vue_demande> getalldemandes()     {         if ( context == null) context = getcontext();         return context.set<vue_demande>().asnotracking <vue_demande>().tolist();     } 

when modify values of tables of view, isn't refreshed!!!

i need know :

  1. why happens?
  2. how can list of rows of view date?

i assume modifying values outside of context. context ask database information doesn't have. if ask context same information again it'll use values retrieved last time (this saves trips server).

to "refresh" new context:

context = getcontext(); //assuming getcontext method returns new context 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -