Exemplo n.º 1
0
        public List <Employee> GetEmployees()
        {
            List <Employee> employees = new List <Employee>();
            //   Employee emp = new Employee();
            //  emp.FirstName = "johnson";
            //  emp.LastName = " fernandes";
            // emp.Salary = 14000;
            //  employees.Add(emp);

            // emp = new Employee();
            //  emp.FirstName = "michael";
            //  emp.LastName = "jackson";
            //  emp.Salary = 16000;
            //  employees.Add(emp);

            // emp = new Employee();
            //emp.FirstName = "robert";
            //  emp.LastName = " pattinson";
            // emp.Salary = 20000;
            //  employees.Add(emp);
            //return employees;
            ReUseDAL reUseDal = new ReUseDAL();

            return(reUseDal.Employees.ToList());
        }
Exemplo n.º 2
0
        public Employee SaveEmployee(Employee e)
        {
            ReUseDAL reUseDal = new ReUseDAL();

            reUseDal.Employees.Add(e);
            reUseDal.SaveChanges();
            return(e);
        }