I want to be able to bind a datagridview to information stored in my entity framework database. I only want to display a subset of the information stored in my entity framework and have so far been carrying this out with a command similar to the following.
Dim x = (from store as stores
in storeentity select store.name,
store.number, store.store_manager.name)
datagridview1.datasource = x
I now want to be able to do this but be able to modify the returned rows in the datagridview and return the changes to the database. This doesnt work at the moment because I am returning an anonymous type. store.store_manager.name
is a property stored in another table linked by a FK.
Can anyone offer any guidance on how to do this and still have it track the objects. I have spent the last four hours trying to get this workng using various methods and have had no luck.
Any help is greatly appreciated, many thanks.