Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
public class TrainingDataResponse : IHttpActionResult
List<Training> _data;
HttpRequestMessage _request;
public TrainingDataResponse(List<Training> data, HttpRequestMessage request)
_data = data;
_request = request;
public Task<HttpResponseMessage> ExecuteAsync(CancellationToken cancellationToken)
var response = new HttpResponseMessage()
Content = new ObjectContent<List<Training>>(_data,new JsonMediaTypeFormatter()),
RequestMessage = _request
return Task.FromResult(response);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment