コード例 #1
0
        public IHttpActionResult Get()
        {
            VacationPackageService vacService = CreateVacPacService();
            var vacPacs = vacService.GetVacPacs();

            return(Ok(vacPacs));
        }
コード例 #2
0
        public IHttpActionResult Get(int id)
        {
            VacationPackageService vacService = CreateVacPacService();
            var vac = vacService.GetVacPacsById(id);

            return(Ok(vac));
        }
コード例 #3
0
        private VacationPackageService CreateVacPacService()
        {
            var userId     = Guid.Parse(User.Identity.GetUserId());
            var vacService = new VacationPackageService(userId);

            return(vacService);
        }