I have a new project with .Net Core. It's a WebAPI project. And I have a separate project for my model.
In WebAPI project, in a controller, I have something like this:
// GET: api/questions [HttpGet] public IEnumerable<Question> GetQuestions() { return _context.Questions .Include( i => i.QuestionType ); }
When I call http://localhost:55555/api/questios/
it just returns the first record, and then this error message: Recv failure: Connection was reset
If I remove the Include
part and just return the _context.Questions
, it work just fine!
What's wrong in my code?