public async Task Match(string endpoint, string timestamp, [FromBody] MatchInfo value) { if (value == null || !value.IsValidModel()) { badRequest.Set(ControllerContext.HttpContext); return; } var server = await dbContext.Servers.FindAsync(endpoint); if (server == null) { notFound.Set(ControllerContext.HttpContext); } server?.Matches.Add(value.CreateMatch(timestamp)); await dbContext.SaveChangesAsync(); }