title: How to calculate a parameter between multiple models? asp.net MVC
body: <p>I have multiple models and I am trying to calculate a parameter named total. I am new to MVC and are not really sure how to do this or where (seen that it should not be done in view that's for sure).</p>
  
  <p>I have this parameter I have to calculate:</p>
  
  <pre><code>public class Bill
  {
  public int Total { get; set; }
  }
  </code></pre>
  
  <p>by using these parameters:</p>
  
  <pre><code>public class Article
  {
     public int Price { get; set; }
     public float Quantity { get; set; }
  }
  </code></pre>
  
  <p>and also:</p>
  
  <pre><code>public class BillLine
  {
     public int DiscountValue { get; set; }
  }
  </code></pre>
  
  <p>The total is calculated using those 3 values but I am not really sure how to do it. The program works like this: each billLine can have 1 article and 1 bill can have many bill lines.</p>