Ejemplo n.º 1
0
 static void Main(string[] args)
 {
     var context = new SoftUniEntities();
     var projects = context.GetProjectsByEmployee("Ruth", "Ellerbrock");
     foreach (var project in projects)
     {
         System.Console.WriteLine("{0} - {1}..., {2}",
             project.Name, project.Description.Substring(0, 30),
             project.StartDate);
     }
 }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            var context = new SoftUniEntities();
            var context2 = new SoftUniEntities();

            var town = context.Towns.Where(t => t.TownID == 1).First();
            var town2 = context2.Towns.Where(t => t.TownID == 1).First();

            town.Name = "Moscow";
            town.Name = "Samara";

            context.SaveChanges();
            context2.SaveChanges();
        }