예제 #1
0
        public async Task <ActionResult <IEnumerable <Location> > > GetLocations()
        {
            var locations = await _repository.GetLocationsAsync();

            if (locations == null || locations.ToList().Count == 0)
            {
                return(NotFound());
            }

            return(Ok(locations));
        }
예제 #2
0
        public async Task <IActionResult> GetUserLocationsAsync()
        {
            var ret = await _repository.GetLocationsAsync(User);

            return(Ok(ret));
        }