コード例 #1
0
 public Dollar GetSavings( string userId )
 {
     using ( MoneyContext context = new MoneyContext( ) )
     {
         return ( from dollar in context.Dollars
                  where dollar.Id == userId
                  select dollar ).Single( );
     }
 }
コード例 #2
0
 public Dollar GetSavings(string userId)
 {
     using (MoneyContext context = new MoneyContext( ))
     {
         return((from dollar in context.Dollars
                 where dollar.Id == userId
                 select dollar).Single( ));
     }
 }