Exemplo n.º 1
0
        public Response DeleteAvailability(DeleteAvailabilityRequest request)
        {
            if (request == null)
            {
                return(Response.CreateResponse(new ArgumentNullException()));
            }

            var response = VerifyIntegrity(request.ClubId, request.PlayerId, request.AvailabilityId);

            if (response != null)
            {
                return(response);
            }

            try {
                repository.DeleteAvailability(request);
                return(Response.CreateSuccessResponse());
            }catch (Exception ex) {
                return(Response.CreateResponse(ex));
            }
        }