Esempio n. 1
0
        public IHttpActionResult Get()
        {
            IVacation       provider  = new VacationsProvider();
            List <Employee> employees = provider.SelectAllEmployees().ToList();

            /*var reports = (from emp in employees
             *             select new
             *             {
             *                 emp.Fullname,
             *                 emp.Vacations
             *             });*/
            if (employees.Count == 0)
            {
                return(NotFound());
            }

            //return Ok(reports);
            return(Ok(employees));
        }
Esempio n. 2
0
        public void DeleteVacation(Vacation vacation)
        {
            IVacation provider = new VacationsProvider();

            provider.DeleteVacation(vacation);
        }
Esempio n. 3
0
        public void DeleteEmployee(Employee employee)
        {
            IVacation provider = new VacationsProvider();

            provider.DeleteEmployee(employee);
        }
Esempio n. 4
0
        public void AddVacation(Employee employee, Vacation vacation)
        {
            IVacation provider = new VacationsProvider();

            provider.CreateVacation(employee, vacation);
        }
Esempio n. 5
0
 public void AddEmployee(Employee employee)
 {
     IVacation provider = new VacationsProvider();
 }