public Response UnAssignCoach(Guid squadId, Guid coachId) { var fullDetails = squadQuery.GetFullSquadDetails(squadId); if (fullDetails.Squad == null || fullDetails.Coach == null) { return(Response.CreateResponse(new List <string> { "The specified squad or coach does not exist" })); } else if (fullDetails.Coach.Guid != coachId) { return(Response.CreateResponse(new IllegalOperationException("The squad's coach is not the one specified"))); } squadRepository.UnAssignCoach(squadId, coachId); return(Response.CreateSuccessResponse()); }