-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
Hi, I'm trying to implement this repository pattern and I'm having some issues. I'm an experienced backend developer but this is my first API so I apologize in advance for my ignorance. I'm trying to implement my controller code and based on the docs for .NET Core 2.2, the suggested method is to return an ActionResult instead of IActionResult. This throws a cast exception due to the IEnumerable. I understand the reason why this exception is thrown, I just don't know what is the correct way to resolve it. Should I revert to using IActionResult in this case and if so what are the consequences on the rest of the code? Or how should I modify the EntityRepository code to make this work with ActionResult?
Metadata
Metadata
Assignees
Labels
No labels