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

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -