protected void Button1_Click(object sender, EventArgs e)
        {
            PermanentEmployee permanantEmployee = new PermanentEmployee
            {
                FirstName = "Sunny",
                LastName = "Patel",
                Gender = "Male",
                AnnualSalary = 70000
            };

            EmployeeDBContext employeeDBContext = new EmployeeDBContext();
            employeeDBContext.Employees.Add(permanantEmployee);
            employeeDBContext.SaveChanges();
        }
Пример #2
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            PermanentEmployee permanantEmployee = new PermanentEmployee
            {
                FirstName    = "Sunny",
                LastName     = "Patel",
                Gender       = "Male",
                AnnualSalary = 70000
            };

            EmployeeDBContext employeeDBContext = new EmployeeDBContext();

            employeeDBContext.Employees.Add(permanantEmployee);
            employeeDBContext.SaveChanges();
        }