I am new to asp.net mvc and viewmodels are new to me as well. I have a view that shows products. In the view I want to show all the Products in one div.
then in another div I want to show just the featuredProducts and in another div the Toprated. I am trying to use different viewmodels for each because I am going to use these again on different page. Is this the correct way to go about doing this and if not what is. Also how can I do this with viewmodels just for the exercise.

Domain Model

```
public class Product
{
    public int ProductId { get; set; }
    public string SKU { get; set; }
    public string Name { get; set; }
    public string Title { get; set; }
    public string Description { get; set; }
    public Boolean FeaturedProduct { get; set; }
    public Boolean NewProduct { get; set; }
    public Boolean TopRated { get; set; }
    public Boolean BestSellers { get; set; }
}

```

ViewModelProductsMain (Parent)

```
public class ViewModelProductsMain 
{
    public ViewModelProducts Products{ get; set; }
    public ViewModelTopRated TopRated{ get; set; }
    public ViewModelFeatured Featured{ get; set; }
}

```

ViewModels (children)

```
public class  ViewModelProducts (Child)
//all products
{
    public int ProductId { get; set; }
    public string SKU { get; set; }
    public string Name { get; set; }
    public string Title { get; set; }
    public string Description { get; set; }
}
public class ViewModelTopRated (Child)
//all products with TopRated true
{
    public int ProductId { get; set; }
    public string SKU { get; set; }
    public string Name { get; set; }
    public string Title { get; set; }
    public string Description { get; set; }
}

public class ViewModelFeatured (Child)
//all products with Featured true
{
    public int ProductId { get; set; }
    public string SKU { get; set; }
    public string Name { get; set; }
    public string Title { get; set; }
    public string Description { get; set; }
}

```

Controller

```
public ActionResult Index()
{
    //How do I, instantiate and populate the model
    var model = new ViewModelProductsMain ();
    return View(model);
}

```

View

```
@model IEnumerable<myProject.ViewModels.ViewModelProductsMain >

```