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
Post a Comment