Pregunta

I would like to use a viewmodel in MVC instead of using viewbag. Is there a way that I could create some generic viewmodel that's shared between all my controllers and then use this in my views? What kind of code would I need for this? I was thinking to maybe create something in a base controller. Is that possible?

No hay solución correcta

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top