title: How to create Profile user page using asp.net mvc 4 with sql server 2008?
body: <p>I want to ask about create profile user page using asp.net mvc 4 and sql server 2008. Before i ask about it. I have create source code in controller  like this:</p>
  
  <pre><code>namespace SIDLubricants.Controllers
  {
  public class ProfileController : Controller
  {
      private Tugas_AkhirEntities db = new Tugas_AkhirEntities();
  
      //
      // GET: /Profile/
  
      public ActionResult Index(LoginModel model)
      {
          var m_cp_customer = from cp in db.M_cp_Customer.Include(m =&gt; m.User) where cp.Id == model.Id select cp;
          return View(m_cp_customer.ToList());
  </code></pre>
  
  <p><strong>and i have create view like this :</strong></p>
  
  <pre><code>&lt;div id="content" class="span12"&gt;
  &lt;div class="row-fluid sortable"&gt;
              &lt;div class="box span12"&gt;
                  &lt;div class="box-header well"&gt;
                      &lt;h2&gt;Contact Person Profile&lt;/h2&gt;
                     &lt;table&gt;
                         &lt;% using (Html.BeginForm()) { %&gt;
                         &lt;%: Html.AntiForgeryToken() %&gt;
                         &lt;%: Html.ValidationSummary(true) %&gt;
                         &lt;tr&gt;
                             &lt;td&gt;&lt;%: Html.DisplayName("Contact Person Customer") %&gt;&lt;/td&gt;
                             &lt;td&gt;&lt;%: Html.DisplayFor(model =&gt; model.kd_cp_customer) %&gt;&lt;/td&gt;
                         &lt;/tr&gt;
                         &lt;tr&gt;
                             &lt;td&gt;&lt;%: Html.DisplayName("First Name") %&gt;&lt;/td&gt;
                             &lt;td&gt;&lt;%: Html.DisplayFor(model =&gt; model.NamaDepan) %&gt;&lt;/td&gt;
                         &lt;/tr&gt;
                         &lt;tr&gt;
                             &lt;td&gt;&lt;%: Html.DisplayName("Last Name") %&gt;&lt;/td&gt;
                             &lt;td&gt;&lt;%: Html.DisplayFor(model =&gt; model.NamaBelakang) %&gt;&lt;/td&gt;
                         &lt;/tr&gt;
                         &lt;tr&gt;
                             &lt;td&gt;&lt;%: Html.DisplayName("Birth Date") %&gt;&lt;/td&gt;
                             &lt;td&gt;&lt;%: Html.DisplayFor(model =&gt; model.Tgl_Lahir) %&gt;&lt;/td&gt;
                         &lt;/tr&gt;
                         &lt;tr&gt;
                             &lt;td&gt;&lt;%: Html.DisplayName("Gender") %&gt;&lt;/td&gt;
                             &lt;td&gt;&lt;%: Html.DisplayFor(model =&gt; model.JenisKelamin) %&gt;&lt;/td&gt;
                         &lt;/tr&gt;
                         &lt;tr&gt;
                             &lt;td&gt;&lt;%: Html.DisplayName("Address") %&gt;&lt;/td&gt;
                             &lt;td&gt;&lt;%: Html.DisplayFor(model =&gt; model.Alamat) %&gt;&lt;/td&gt;
                         &lt;/tr&gt;
                         &lt;tr&gt;
                             &lt;td&gt;&lt;%: Html.DisplayName("City") %&gt;&lt;/td&gt;
                             &lt;td&gt;&lt;%: Html.DisplayFor(model =&gt; model.Kota) %&gt;&lt;/td&gt;
                         &lt;/tr&gt;
                         &lt;tr&gt;
                             &lt;td&gt;&lt;%: Html.DisplayName("Province") %&gt;&lt;/td&gt;
                             &lt;td&gt;&lt;%: Html.DisplayFor(model =&gt; model.Provinsi) %&gt;&lt;/td&gt;
                         &lt;/tr&gt;
                         &lt;tr&gt;
                             &lt;td&gt;&lt;%: Html.DisplayName("Zip Code") %&gt;&lt;/td&gt;
                             &lt;td&gt;&lt;%: Html.DisplayFor(model =&gt; model.KodePos) %&gt;&lt;/td&gt;
                         &lt;/tr&gt;
                         &lt;tr&gt;
                             &lt;td&gt;&lt;%: Html.DisplayName("Phone") %&gt;&lt;/td&gt;
                             &lt;td&gt;&lt;%: Html.DisplayFor(model =&gt; model.Telp) %&gt;&lt;/td&gt;
                         &lt;/tr&gt;
                         &lt;tr&gt;
                             &lt;td&gt;&lt;%: Html.DisplayName("Mobile") %&gt;&lt;/td&gt;
                             &lt;td&gt;&lt;%: Html.DisplayFor(model =&gt; model.Mobile) %&gt;&lt;/td&gt;
                         &lt;/tr&gt;
                         &lt;tr&gt;
                             &lt;td&gt;&lt;%: Html.DisplayName("Email") %&gt;&lt;/td&gt;
                             &lt;td&gt;&lt;%: Html.DisplayFor(model =&gt; model.Email) %&gt;&lt;/td&gt;
                         &lt;/tr&gt;
                         &lt;tr&gt;
                             &lt;td&gt;&lt;%: Html.DisplayName("UserName") %&gt;&lt;/td&gt;
                             &lt;td&gt;&lt;%: Html.DisplayFor(model =&gt; model.User.userName) %&gt;&lt;/td&gt;
                         &lt;/tr&gt;
                         &lt;tr&gt;
                             &lt;td&gt;&lt;input type="button" onclick="" value="edit" /&gt;&lt;/td&gt;
                             &lt;td&gt; &lt;input type="submit" value="Delete" /&gt;&lt;/td&gt;
                         &lt;/tr&gt;
  
                         &lt;% } %&gt;
                     &lt;/table&gt;
  
                  &lt;/div&gt;
              &lt;/div&gt;&lt;!--/span--&gt;
  
          &lt;/div&gt;&lt;!--/row--&gt;
  </code></pre>
  
  <p></p>
  
  <p>but, i got an error message like this: </p>
  
  <pre><code>    Server Error in '/' Application.
       --------------------------------------------------------------------------------
  
  
   The model item passed into the dictionary is of type 'System.Collections.Generic.List`1[SIDLubricants.Models.M_cp_Customer]', but this dictionary requires a model item of type 'SIDLubricants.Models.M_cp_Customer'
  </code></pre>
  
  <p>Can you help me about it. I want final output is show all of data about profile user after action log in. Thank you...</p>