Esempio n. 1
0
        public IActionResult Delete([FromBody] Location location)
        {
            var result = _locationsRepository.DeleteLocation(location);

            if (result == null)
            {
                return(NotFound($"There is no location with specified ID: {location.Id}"));
            }

            return(Ok(result));
        }
 // DELETE api/Locations/{id}
 public void Delete(int id)
 {
     db.DeleteLocation(id);
 }
Esempio n. 3
0
 public async Task <ActionResult <Location> > DeleteLocation(long id)
 {
     return(await _repository.DeleteLocation(id));
 }