Refreshing enity based on view

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
angelm
Posts: 1
Joined: Sun 09 Dec 2012 21:36

Refreshing enity based on view

Post by angelm » Sun 09 Dec 2012 21:51

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

Shalex
Site Admin
Posts: 8241
Joined: Thu 14 Aug 2008 12:44

Re: Refreshing enity based on view

Post by Shalex » Wed 12 Dec 2012 11:42

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.

Post Reply