I have asp.net MVC application.
And I have a main page (View).
The data in the view contains: news headlines, weather update, sports section.
So for this I have created a model.
Model contains all the requirements: news headlines (list of class type News), weather (string weather), sports section (list of class SportSection)
So my model class is something like this
public class Main
{
public List<News> news=new List<News>();
public List<SportSection> results=new List<SportSection>()
public string weather;
}
And I am populating my data in Controller. And sending my model to view in Controller's action method like this
Models.Main m=new Models.Main()
...
...
...
return View(m);
I need to know, my understanding of Asp.net MVC Models is correct as it is shown in example above?