1234567891011121314151617181920212223242526272829 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Threading.Tasks;
- using Microsoft.AspNetCore.Mvc;
- using UnivateProperties_API.Repository.Timeshare;
-
- // For more information on enabling Web API for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
-
- namespace UnivateProperties_API.Controllers.Timeshare
- {
- [Route("api/[controller]")]
- [ApiController]
- public class ResortController : ControllerBase
- {
- private readonly IResortRepository _Repo;
-
- public ResortController(IResortRepository repo)
- {
- _Repo = repo;
- }
-
- [HttpGet("{regionCode}")]
- public IActionResult Get(string regionCode)
- {
- return new OkObjectResult(_Repo.GetResortsByRegion(regionCode));
- }
- }
- }
|