The model item passed into the dictionary is of type 'System.Collections.Generic.List`1
Solution:
In your view at the top where your model declaration is having wrong declaration and this is causing the problem
you need to have:
@model IEnumerable<YourNameSapce.YourDto>
You probably used strongly typed scaffolding feature to generate your view but instead of details option you chose a list option...
Solution:
In your view at the top where your model declaration is having wrong declaration and this is causing the problem
you need to have:
@model IEnumerable<YourNameSapce.YourDto>
You probably used strongly typed scaffolding feature to generate your view but instead of details option you chose a list option...
No comments:
Post a Comment