I have a table that is based on two foreign keys
<p>I have a table that is based on two foreign keys. One is <code>memberID</code>, and the second is <code>movieID</code>. I need to take from this table the row that connects these two and get from the same row <code>RentDays</code>, which is an <code>int</code>.</p>

<p>i did this but i think its not good:</p>

<pre><code>public int  GetRentDays(int memberID, string movieID)
{      
    var movieRentDays = 
        from Rents in videoLibDB.Rents
        where Rents.MemberID == memberID &amp;&amp; Rents.MovieID == movieID
        select Rents.RentDays;
        return  movieRentDays ;
}
</code></pre>
