SaveChanges() doesn't work (Entity Framework, C#, Windows Forms)
I have a very weird problem. I try to submit changes to the d开发者_如何学运维atabase (using Entity Framework) like this:
private ProfEntities pe = new ProfEntities();
//...
var row = pe.Irregular_Veebs.Single(e => e.id == id); //selecting one row by id
row.seen = true; //changing seen property to true
pe.SaveChanges();
it looks simple but it doesn't work: when I look in Database Explorer, the "seen" field is still false. AM I doing something wrong?
If you're using file database you probably explore db which is in your solution folder. To see changes you should open db from Release or Debug folder
精彩评论