-6

Getting this error when trying to access my Market/Index, and I have no idea what's going on..

The model item passed into the dictionary is of type 'System.Collections.Generic.List'1<JuleMarked.Models.Market>', but this dictionary requires a model item of type 'JuleMarked.Models.Market'.

The view is added from the controller and I've checked everything I can think of, any help would be appreciated.

Chris
  • 1
  • 1
  • 8
    It's telling you exactly what the problem is. You're passing a list of `Market`, when it's expecting a single instance. Try giving us an example of your code and we can help you. – ThePerplexedOne Dec 06 '16 at 15:01
  • Yeah, ThePerplexedOne is right. You might be passing in the results of a Linq Where() query, when you probably need First() – Ash8087 Dec 06 '16 at 15:08

1 Answers1

0

You are trying to pass a List of Market, but the model requires a Market.

Antoine Delia
  • 1,728
  • 5
  • 26
  • 42