You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
In MVC 6 this throws a null reference exception. Setting the model property of the ViewData is invalid as the value of ViewData is null? I believe this has something to do with dependency injection but i can't find a concrete explanation anywhere as to why this behavior is happening.
The simplest way i can get this to work is something like:
return new ViewResult
{
ViewName = "Index",
ViewData = new ViewDataDictionary<FormViewModel>(ViewData, model)
};
This uses the Microsoft.AspNet.Mvc.Controller.ViewData property. I can pass this property through to the orchestrator but i'm not sure if this is just plain wrong and i'm missing a trick here?