Ejemplo n.º 1
0
 public void AddEmpTableSplit(EmployeeDetail empDetails)
 {
     using (var context = new SampleDB1Entities())
     {
         context.EmployeeDetails.Add(empDetails);
         context.SaveChanges();
     }
 }
Ejemplo n.º 2
0
        public void UpdateEmpTableSplit(EmployeeDetail empDetails)
        {
            using (var context = new SampleDB1Entities())
            {
                var emp = context.Employees.Include("EmployeeContactDetail").FirstOrDefault(x => x.Id == empDetails.Id);
                emp.Name = empDetails.Name;
                emp.Salary = empDetails.Salary;
                emp.DepartId = empDetails.DeptId;

            }
        }