Skip to main content
4 of 12
added 196 characters in body
mishan
  • 211
  • 2
  • 11

I am not the greatest person to answer this as my knowledge is still lacking in many of the aspects, but I will try to give you a bit different perspective. so, when you receive a better answer from someone more knowledgeable you might want to listen to them :)

The "MVC" in MVC means Model-View-Controller architecture, where (simplified) the controller does something and produces (or passes existing) model that is given to a view that then uses it for presentation.

Nowhere in there is there a need for the model to do anything on its own. It's there as a way to pass information between the controller and the view.

Also, the Model you're showing is an ORM model - it is not the same model that we're talking about in the MVC.

In your case, it's an entity framework model describing (a part of) a table in the database.

It can be used as a model in MVC, but generally, I was always discouraged from doing so (other than for really simple applications) because passing ORM models as MVC models introduces the potential for several problems (do you really want to send or expect to receive a database model from a form in your pages? - as an easy example).

I also think you might be using the term MVC and mean MVVM (or MVB), where you have Model, View, and ViewModel(Binder) and the ViewModel(Binder) is responsible for notifying the view of its changes.

In MVVM, the Model is the background logic doing something (so, basically an equivalent to controller in MVC), it fills the ViewModel(binder) which acts as an intermediary and might (but does not have to) notify the view of its changes.

mishan
  • 211
  • 2
  • 11