Update with Entity Framework C# -


i want update items entity framework,

the code correct don't have result in database!!

using(checkinentrepriseentities2 context = new checkinentrepriseentities2()) {  clients clien = new clients();   clien.date_arrival = datetime.parse(textboxdatein.text);  clien.arrival_time = textboxtime.text;  clien.aller_a = comboboxpersonnel.selecteditem.tostring();  clien.badge = int.parse(comboboxbadge.selecteditem.tostring());   int badgetiped = int.parse(comboboxbadge.selecteditem.tostring());   context.savechanges(); } 

this code creating new clients object.

if want update results database have select clients object database :

clients clien = context.clients.single(x => x.id == yourid); // logic context.savechanges(); 

Comments

Popular posts from this blog

How to get the arclen between two curve points in Maya? -

C++ Linked List -

git svn - Unignore directories in git-svn (adding directories to a sparse checkout) -