public async Task <HttpResponseMessage> CoachProfile([HttpTrigger(AuthorizationLevel.Anonymous, "get", "delete", Route = "profile/coach/{coachID}")] HttpRequestMessage request, int coachID, ILogger log) { coachService = new CoachService(log); if (request.Method == HttpMethod.Get) { return(await coachService.GetCoachProfileByID(coachID)); } else if (request.Method == HttpMethod.Delete) { return(await coachService.DeleteCoachProfileByID(coachID)); } else { throw new NotImplementedException(); } }