I was wondering if there\'s a way to specify a model for the _layout.cshtml file, i\'ve seen lots of posts with the basic same question with people replying with \"alternati
Then all models inherit from that BaseModel class.
public class MyModel : BaseModel
{
}
As others stated, it is not a good practice. If your model forgets to inherit from BaseModel, it'll throws exception at run time. However, it is up to you.