C#: Update record using EF
Update record in database using entity framework
try { using (var context = new myEntities()) { var document = context.ORDERS.Single(parameter => parameter.ID_ORDER == idOrder); document.ORDER_STATUS = status; context.SaveChanges(); } } catch (Exception ex) { Logger.TraceError(ex.Message); }
0 Comments