title: Get the latest Value of table via EntityFramework
body: <p>I have a table that have several field and each of them update separately by separate ViewModel , Now I wanna to get the latest Value of a specific field (maybe it has updated in fifth record of my table) , OK? now what I have write is look like this :</p>
  
  <pre><code>  public ViewResult ShowPiece()
          {
              var context = new SiteContext();
              var showPiece = context.Portraits.LastOrDefault();
              return View(showPiece);
          }
  </code></pre>
  
  <p>but when I run the application and navigate above action , I got thie Error :</p>
  
  <p>LINQ to Entities does not recognize the method , and this method cannot be translated into a store expression...</p>
  
  <p>what is the problem with that ??</p>