Page 1 of 1

Refreshing enity based on view

Posted: Sun 09 Dec 2012 21:51
by angelm
Hello,
I have some issue with get fresh data after update table.
in my grid i bind data from view, and i cant refresh view after update.
Code:

Dim context As MyEntities
sub Procedure_update
Dim RTable As MyTable = (From it In context.MyTables _
Where it.Id = RplanId).FirstOrDefault
RTable.MyValue = 10
context.SaveChanges()
End sub

sub Procedure_refresh_ViewMyTable
Dim query = From it In context.ViewMyTables _
Select it
grid.bindingsource=query
End sub



Thanks for any advice

Re: Refreshing enity based on view

Posted: Wed 12 Dec 2012 11:42
by Shalex
The examples of data binding are available here:
http://www.codeproject.com/Articles/221 ... n-WinForms
http://thedatafarm.com/LearnEntityFrame ... ta-source/

If this doesn't help, send us:
1) the exact text of the error (if any) and its stack trace;
2) a small test project with the corresponding DDL/DML script to reproduce the issue in our environment.