Ejemplo n.º 1
0
        public static void Main(string[] args)
        {
            var firstContext  = new SoftuniModel();
            var secondContext = new SoftuniModel();

            var firstEmployee  = firstContext.Employees.Find(1);
            var secondEmployee = secondContext.Employees.Find(2);

            firstEmployee.FirstName  = "Stamat";
            secondEmployee.FirstName = "Kircho";

            firstContext.SaveChanges();
            secondContext.SaveChanges();
        }
Ejemplo n.º 2
0
 public static void Add(Employee employee)
 {
     context.Employees.Add(employee);
     context.SaveChanges();
 }