title: Using a lambda expression to assign data to a ViewModel in a query using .Find()
body: <p>I'm writing a simple MVC app to learn about ASP.NET MVC. I'm following the Pluralsight courses and they've been a great help. However, I'm still a bit in the dark when it comes to LINQ.</p>
  
  <p>I have a piece of working code, and I'd like to know if it could be improved or be made more concise.</p>
  
  <p>What it needs to do:</p>
  
  <ol>
  <li>Extract data from my DB based on the given id (which is the primary key)</li>
  <li>Create a new BoardViewModel(), assigning only the Title</li>
  <li>Return an instance of BoardViewModel, with the Title property set</li>
  </ol>
  
  <p>Currently, I have two ways of doing this, which both work:</p>
  
  <pre><code>var board =
      db.Boards
          .Where(b =&gt; b.Id == id)
          .Select(b =&gt; new BoardViewModel {
              Title = b.Title
          })
          .First();
  </code></pre>
  
  <p>And method 2:</p>
  
  <pre><code>var board = 
      db.Boards
          .Find(id);
  
  BoardViewModel model = new BoardViewModel();
  model.Title = board.Title;
  </code></pre>
  
  <p>What I'm mostly wondering about, in a query where I request multiple results, I'm able to assign the values to a ViewModel using a lambda expression in the Select extension method, can I use something similar in the query where I'm using the Find method?</p>
  
  <p>For example, something that would look like this:</p>
  
  <pre><code>var board = 
      db.Boards
          .Select(b =&gt; new BoardViewModel {
              Title = b.Title
          }
          .Find(id);
  </code></pre>
  
  <p>I'm very interested in what other ways there are on approaching this.</p>