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();
        }
Example #2
0
 public static void Add(Employee employee)
 {
     context.Employees.Add(employee);
     context.SaveChanges();
 }