mosh-hamedani / vidly-mvc-5

955 stars 1.53k forks source link

ViewModel Error #35

Open cmiriyala opened 6 years ago

cmiriyala commented 6 years ago

Hello Sir,

Even though I have included required ViewModel in the View, there is an error as follows.

The model item passed into the dictionary is of type 'MoRe.ViewModels.NewCustomerViewModel', but this dictionary requires a model item of type 'MoRe.ViewModels.RandomMovieViewModel'.

image

image

I am unable to fix this error please let me know the solution.

cmiriyala commented 6 years ago

Solved this by adding NewCustomerViewModel data to RandomMovieViewModel

taiwokaffo commented 6 years ago

thanks man it worked fine

poosarla commented 6 years ago

Ya, I resolved the issue, You have written @model MoRe.ViewModels.RandomMovieViewModel in Layout.cshtml, Check once and remove that, it works as you expected. Really Mosh is not responding to it all. Even though we are going with Apid Services.