Пример #1
0
        static void Main(string[] args)
        {
            using (var db = new HitssContext())
            {
                Console.Write("Enter the name of the Employee:");
                var EmployeeName = Console.ReadLine();
                Console.Write("Enter the Mail of the Employee:");
                var EmployeeMail = Console.ReadLine();
                Console.Write("Enter the Birth of the Employee:");
                var EmployeeBirth = Console.ReadLine();
                Console.Write("Enter the Start Date of the Employee:");
                var EmployeeDate = Console.ReadLine();
                var employee     = new Employee {
                    Name = EmployeeName, Mail = EmployeeMail, BirthDate = EmployeeBirth, StartDate = EmployeeDate
                };
                db.Employees.Add(employee);
                db.SaveChanges();



                Console.ReadKey();
            }
        }