In my UWP application I have a model called Product.cs:

```
public class Product : IEquatable<Product>
{
    public string ProductName { get; set; }
    public double PricePerPiece { get; set; }
    public double PricePerKilogram { get; set; }
    public double Iva { get; set; }
    public double ContainerPrice { get; set; }
    public string ContainerType { get; set; }
    public Guid ProductId { get; set; } = Guid.NewGuid();

    public bool Equals(Product otherProduct)
    {
        return
            this.ProductName == otherProduct.ProductName &&
            this.PricePerPiece == otherProduct.PricePerPiece &&
            this.PricePerKilogram == otherProduct.PricePerKilogram &&
            this.Iva == otherProduct.Iva &&
            this.ContainerPrice == otherProduct.ContainerPrice &&
            this.ContainerType == otherProduct.ContainerType;
    }
}

```

I created a DbSet based on this model and used it as ItemSource for a DataGrid in a View.

```
public class MarketContext : DbContext
{
    /// <summary>
    /// Creates a new DbContext.
    /// </summary>
    public MarketContext(DbContextOptions<MarketContext> options) : base(options)
    { }

    /// <summary>
    /// Gets the customers DbSet.
    /// </summary>
    public DbSet<Customer> Customers { get; set; }

    /// <summary>
    /// Gets the products DbSet.
    /// </summary>
    public DbSet<Product> Products { get; set; }
}

```

Now I would like to have another DataGrid in a different View that display the ProductName, the PricePerPiece but also the quantity and a total price (quantity \* PricePerPiece). The quantity of each product is inserted by the user while the total price column has to update automatically its content.
The solution that I tried is to create another model called LineProduct.cs with the Quantity and TotalPrice properties but I don't know how to associate them with the products stored in the database and display all these four columns in a single DataGrid.

```
public class LineProduct
{
    public string ProductName { get; set; }
    public double PricePerPiece { get; set; }
    public double Quantity { get; set; }
    public double TotalPrice { get; set; }
    public Guid LineProductId { get; set; } = Guid.NewGuid();
}

```

ProductName and PricePerPiece properties in the LineProduct class must be retrive the content from the Products table I created in the database.
The goal is to allow the user to add, update or delete products in a view (this part works fine) and make calculation with this products in another view and eventually save it in the database with a DbSet.