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 :
- why happens?
- 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
Post a Comment