I am having an issue when I rune a RestSharp request on my api. The content response that I am getting is an empty array. Any idea as to why this would by empty when I try and send the values to my model? (It seemed to work fine when I ran a get user, I think it may have to do with using an IEnumerable)
Here is my RestSharp request:
var request = new RestRequest("/problems/", Method.GET);
request.AddHeader("id-header", id);
request.RequestFormat = DataFormat.Json;
var response = client.Execute(request) as RestResponse;
List<MyModel> d = JsonConvert.DeserializeObject<List<MyModel>>(response.Content);
return View(d);
Here is my method in my API:
[ResponseType(typeof(ProblemModel))]
public IQueryable<ProblemModel> GetProblems()
{
    var problems = User.Companies
                       .SelectMany(c => c.Projects)
                       .SelectMany(p => p.Problems)
                       .AsQueryable<Problem>()
                       .Select(factory.AsProblemModel);
    return problems;
}
And My Model the RestSharp is using:
public class MyModel
{
    public int Id { get; set; }
    public string Title { get; set; }
    public string Description { get; set; }
    public Nullable<int> AssignedToId { get; set; }
    public int ProjectId { get; set; }
}