public IHttpActionResult Get() { VacationPackageService vacService = CreateVacPacService(); var vacPacs = vacService.GetVacPacs(); return(Ok(vacPacs)); }
public IHttpActionResult Get(int id) { VacationPackageService vacService = CreateVacPacService(); var vac = vacService.GetVacPacsById(id); return(Ok(vac)); }
private VacationPackageService CreateVacPacService() { var userId = Guid.Parse(User.Identity.GetUserId()); var vacService = new VacationPackageService(userId); return(vacService); }