title: How to pass 3 models data to asp.net MVC view
body: <p>My requirement as follows, In my database, have tables as follows.In there table called <code>Tbl_loan_details</code> <code>LOANID</code> reference to other tables as FK(<code>las_fac_id</code> and <code>lac_fac_id</code>). </p>
  
  <p><a href="https://i.stack.imgur.com/hCUZb.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hCUZb.jpg" alt="enter image description here"></a></p>
  
  <p>I need to get all the 3 tables columns to my view called details. </p>
  
  <p>This is my model classes,</p>
  
  <pre><code>public partial class Tbl_Loan_Details
  {
      public int LOANID { get; set; }
      public string LastName { get; set; }
      public string FirstName { get; set; }
      public string CUSAGE { get; set; }
      public string CUSNAME { get; set; }
      public string AMOUNT { get; set; }
      public string Address { get; set; }
      public string City { get; set; }
  }
  
  public partial class Tbl_CRIB_Details
  {
      public int CRIBID { get; set; }
      public Nullable&lt;int&gt; LAS_FAC_ID { get; set; }
      public string CRIB_NAME { get; set; }
      public string CUSAGE { get; set; }
      public string CUSNAME { get; set; }
      public string CHECQ { get; set; }
  
      public virtual Tbl_Loan_Details Tbl_Loan_Details { get; set; }
  }
  
  public partial class Tbl_loan_para
  {
      public int ID { get; set; }
      public string paraName { get; set; }
      public string Amount { get; set; }
      public Nullable&lt;int&gt; lac_fac_id { get; set; }
  
      public virtual Tbl_Loan_Details Tbl_Loan_Details { get; set; }
  }
  </code></pre>
  
  <p>my controller as follows, currently which accept parameter as id, and return only <code>tbl_loan_details</code></p>
  
  <pre><code>// GET: /Loan/Details/5
  public ActionResult Details(int? id)
  {
  
      Tbl_Loan_Details tbl_loan_details = db.Tbl_Loan_Details.Find(id);
      return View(tbl_loan_details);
  }
  </code></pre>
  
  <p>view Detail code as follows. </p>
  
  <pre><code>&lt;h2&gt;Details&lt;/h2&gt;
  &lt;div&gt;
      &lt;dl class="dl-horizontal"&gt;
          &lt;dt&gt;
              @Html.DisplayNameFor(model =&gt; model.LastName)
          &lt;/dt&gt;
  
          &lt;dd&gt;
              @Html.DisplayFor(model =&gt; model.LastName)
          &lt;/dd&gt;
  
          &lt;dt&gt;
              @Html.DisplayNameFor(model =&gt; model.FirstName)
          &lt;/dt&gt;
  
          &lt;dd&gt;
              @Html.DisplayFor(model =&gt; model.FirstName)
          &lt;/dd&gt;
      &lt;/dl&gt;
  &lt;/div&gt;
  &lt;p&gt;
      @Html.ActionLink("Edit", "Edit", new { id = Model.LOANID }) |
  &lt;/p&gt;
  </code></pre>
  
  <p>How can I access other table's column in detail view. I mean I need to show following  <code>tbl_loan_para(paraName) Tbl_crib_detail(Crbi_name,Checq)</code> data in details view.</p>
  
  <p>I pass <code>id</code> to my controller as above code, based on that id I need to show each table data in details view. </p>