Example #1
0
        public async Task <IActionResult> Delete(Guid id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var city = repository.GetById(id);

            if (city == null)
            {
                return(NotFound());
            }
            repository.Delete(city);
            return(RedirectToAction(nameof(Index)));
        }
Example #2
0
 public void RemoveCities(params Cities[] cities)
 {
     /* Validation and error handling omitted */
     _citiesRepository.Delete(cities);
 }