Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to implement CRUD operations when Entity Framework 5+ is used

$
0
0

This example illustrates how to implement CRUD operations with XtraGrid and EF 5. This approach is also applicable for Entity Framework 6.

 To get a possibility to commit changes, it is necessary to store DbContext instance that is used to get the grid's data source. Then when necessary, you can commit changes to the data base using the DbContext.SaveChanges method 

Question Comments

Added By: Hassan Gulzar at: 2/1/2015 5:26:37 AM    

I'm having issues with this approach. I have a DirType Entity that has many DirParam Entities each. If I bind to grid as mentioned below, I get the desired drilling but in the child view, If I enter a value for any cell and move to another cell, the value disappears. This is not happening on main view but sub views only.

Added By: Nikita (DevExpress Support) at: 2/2/2015 12:32:04 AM    

Hello,

To process your recent post more efficiently, I created a separate ticket on your behalf: T203624: GridControl - Changes in a detail view's cell are not saved when EF5 is used as a data source. . This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>