title: how can use a custom method in controller in asp net mvc
body: <p>i m trying to learn something in asp net mvc.</p>
  
  <p>i could not handle a problem.</p>
  
  <p>i have a custom class like</p>
  
  <pre><code>public class trenMethod
  {
      public testDBContex db;
      public List&lt;IsSoSu&gt; ListAll()
  
      { 
          var Name= from a in db.test1
                     from b in db.test2
                     where a.Name== b.Name
                     select new IsSoSu()
                     {
                         NameLast=a.Name,
                         MidNameLast=a.MidName,
                         SurnameLast=b.Surname
                     };
         return Name.ToList();
      }
  </code></pre>
  
  <p>it s ok with that. but when i want to use this method in controller, the method does not seem.</p>
  
  <pre><code>public ActionResult IndexTrEn()
      {
          trenMethod.    &lt;there is nothing in here&gt; ( i expect that trenMethod.ListAll(); but there is nothing except "Equals, ReferenceEquals" ) }
  </code></pre>
  
  <p>where i make mistake?</p>