public bool DeleteHalls(HallMember hallMember) { return(_hallRepository.DeleteHall(new HallMemberDAO { HallId = hallMember.HallId })); }
public async Task <IActionResult> DeleteHallById( [FromRoute, SwaggerParameter(Description = "Id of hall to delete", Required = true)] Guid hallId) { var hallToDelete = await _hallRepository.GetHallAsync(hallId); if (hallToDelete == null) { return(NotFound()); } _hallRepository.DeleteHall(hallToDelete); if (!await _hallRepository.SaveChangesAsync()) { _logger.LogError($"Deleting hall: {hallId} failed on save"); } return(NoContent()); }