title: Get Row Index in a list by using entity framework
body: <p>I have 5 datas in my list.</p>
  
  <p><strong>MyList</strong></p>
  
  <p>So i want to know , how can i get selected Id's Row Number ?</p>
  
  <pre><code>var MyProductId= 135;
  var SelectedDataRowNumber = context.SP_MyList.ToList()
                                     .Where(s=&gt;s.Id==MyProductId)
                                     .FirstOrDefault();
  </code></pre>
  
  <p>As instance,
  My List has 5 datas like below,</p>
  
  <pre><code>Id-Name
  
  6,Computer
  
  135,KeyBoard
  
  68,Mouse
  
  98,Telephone
  
  213,Laptop,
  </code></pre>
  
  <p><code>MyProductId</code> is <code>135</code> so it matchs with Keyboard.It is row count number( index )must be "1" because 0 is Computer.</p>
  
  <p>How can i get selected Id's row count(index) number ?</p>