Answers for "how to update record using entity framework in c#"

C#
0

how to update record using entity framework 5

BY LOVE SINGH.

employeeDBEntities.tblEmployee.Attach(objTblEmployee);
employeeDBEntities.Entry(objTblEmployee).State = EntityState.Modified;
employeeDBEntities.SaveChanges();
Posted by: Guest on May-17-2020
0

how to update record using entity framework in c#

public void UpdateCustomer(Customer custDTO)
{
   CustomerEntities ce = new CustomerEntities();
   Customer cust = ce.Customers.Find(custDTO.Id);
   if (cust != null)
   {
    DbEntityEntry<Customer> ee = ctx.Entry(cust);
Posted by: Guest on February-02-2021

Code answers related to "how to update record using entity framework in c#"

C# Answers by Framework

Browse Popular Code Answers by Language