Ejemplo n.º 1
0
        public async Task <ActionResult> Delete(int id)
        {
            var toDelete = await _repository.GetAsync(id);

            if (toDelete == null)
            {
                return(BadRequest($"coach with {id} wasn't found"));
            }

            _repository.Delete(toDelete);
            await _repository.SaveChangesAsync();

            return(NoContent());
        }
Ejemplo n.º 2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="id"></param>
 public void Delete(Guid id)
 {
     _hallRepository.Delete(id);
 }