public async Task <HttpResponseMessage> CreateChallenges([FromBody] ChallengesPackage challengpkg) { if (!ModelState.IsValid) { return(Request.CreateResponse(HttpStatusCode.BadRequest)); } var result = await challengeManager.CreateChallenge(challengpkg); if (!result) { return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, "something went wrong")); } return(Request.CreateResponse(HttpStatusCode.Created, "Request successfully sent")); }
public static void Main() { var c1 = ChallengeManager.CreateChallenge(); var c2 = ChallengeManager.CreateChallenge(); //var c = ChallengeManager.CreateChallenge<Challenage>(); // This statement won't compile }