public Task <HttpResponseMessage> GetAsync(string url) { var responseContent = new ProjectSpeedy.Models.Bet.Bet(); var response = new HttpResponseMessage(System.Net.HttpStatusCode.OK); response.Content = new StringContent(JsonSerializer.Serialize(responseContent)); return(Task.FromResult(response)); }
/// <inheritdoc /> public async System.Threading.Tasks.Task <bool> CreateAsync(string projectId, string problemId, Models.Bet.BetNew form) { // The new project object var newBet = new ProjectSpeedy.Models.Bet.Bet() { Name = form.Name, Description = form.Description, SuccessCriteria = form.SuccessCriteria, Created = DateTime.UtcNow, ProjectId = Project.PREFIX + projectId, ProblemId = Problem.PREFIX + problemId, Status = "Created" }; // Creates the project and checks if the id is returned. var newId = await this._serviceBase.DocumentCreate(newBet, Bet.PARTITION); return(!string.IsNullOrWhiteSpace(newId)); }