I'm using MVC module template (https://github.com/jbrinkman/DNN8Templates) to build my new modules. It work fine and is very useful! Thanks to jbrinkman!
Creating and installing two different modules I'm able to add them on two different pages but if I add on the same page I receive an exception on second MVC module:
Error: DnnMvcModule1 is currently unavailable.
DotNetNuke.Services.Exceptions.ModuleLoadException:
The model item passed into the dictionary is of type
'System.Collections.Generic.List`1[Dnn.Modules.DnnMvcModule1.Models.Item]',
but this dictionary requires a model item of type
'System.Collections.Generic.IEnumerable`1[Dnn.Modules.Codepoint_Test.Models.Item]'.
---> System.InvalidOperationException: The model item passed into
the dictionary is of type
'System.Collections.Generic.List`1[Dnn.Modules.DnnMvcModule1.Models.Item]',
but this dictionary requires a model item of type
'System.Collections.Generic.IEnumerable`1[Dnn.Modules.Codepoint_Test.Models.Item]'.
at System.Web.Mvc.ViewDataDictionary`1.SetModel(Object value)
at System.Web.Mvc.ViewDataDictionary..ctor(ViewDataDictionary
dictionary)
at System.Web.Mvc.WebViewPage`1.SetViewData(ViewDataDictionary
viewData)
at System.Web.Mvc.RazorView.RenderView(ViewContext viewContext,
TextWriter writer, Object instance)
at
DotNetNuke.Web.Mvc.Framework.ActionResults.DnnViewResult.ExecuteResult(ControllerContext
context, TextWriter writer)
at DotNetNuke.Web.Mvc.MvcHostControl.RenderModule(ModuleRequestResult
moduleResult)
at DotNetNuke.Web.Mvc.MvcHostControl. (EventArgs e)
--- End of inner exception stack trace ---