title: Specified type member not supported in LINQ to Entities
body: <p>I have an enum type called StatusTypes</p>
  
  <pre><code>public enum StatusTypes
  {
      Open = 1,
      Allocated = 2,
      WorkInProgress = 3,
      WaitingOnRequestor = 4,
      WaitingOnThirdParty = 5,
      Monitoring = 6,
      Testing = 7,
      OnHold = 8,
      Complete = 9,
      SignedOff = 10,
      Reopened = 11
  }
  </code></pre>
  
  <p>I'm trying to use this in my repository....</p>
  
  <pre><code>public IQueryable&lt;Incident&gt; GetAllOutstandingIncidents()
  {
      return from i in db.Incidents
                 where i.Status != Types.StatusTypes.SignedOff &amp;&amp; i.Status != Types.StatusTypes.Complete &amp;&amp; i.DeletedDateTime != null
                 orderby i.DueDateTime
                 select i;
      }
  </code></pre>
  
  <p>...and then use it in my view...</p>
  
  <pre><code>&lt;tbody&gt;
       &lt;% foreach (var incident in Model.TotalIncidentsOutstandingList) { %&gt;
                  &lt;tr&gt;
                      &lt;td&gt;&lt;%: incident.IncidentID %&gt;&lt;/td&gt;
                      &lt;td&gt;&lt;%: incident.Caller.NetworkName %&gt;&lt;/td&gt;
                      &lt;td&gt;&lt;%: incident.Title %&gt;&lt;/td&gt;
                      &lt;td&gt;&lt;%: incident.Service.Title %&gt; / &lt;%: incident.Category.Title %&gt; &lt;% if (incident.Subcategory != null) { %&gt; / &lt;%: incident.Subcategory.Title %&gt;&lt;% } %&gt;&lt;/td&gt;
                      &lt;td&gt;&lt;%: incident.Priority %&gt;&lt;/td&gt;
                      &lt;td&gt;&lt;/td&gt;
                      &lt;td&gt;&lt;%: incident.AllocatedTo %&gt;&lt;/td&gt;
                      &lt;td&gt;&lt;%: incident.DueDateTime %&gt;&lt;/td&gt;
                  &lt;/tr&gt;
              &lt;% } %&gt;
          &lt;/tbody&gt;
  </code></pre>
  
  <p>... but I'm getting the error "The specified type member 'Status' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported."</p>
  
  <p>Any help gratefully received!</p>
  
  <p><strong>UPDATE TO SHOW incident.cs</strong></p>
  
  <pre><code>public class Incident
  {
      public int IncidentID { get; set; }
      public DomainUser Caller { get; set; }
  
      [Display(Name = "Caller Type")]
      public Types.CallerTypes CallerType { get; set; }
  
      public Service Service { get; set; }
      public Category Category { get; set; }
      public Subcategory Subcategory { get; set; }
      public string Title { get; set; }
  
      [Display(Name = "Problem Description")]
      public string ProblemDescription { get; set; }
  
      public Equipment Equipment { get; set; }
  
      public Types.ImpactTypes Impact { get; set; }
      public Types.UrgencyTypes Urgency { get; set; }
  
      [Display(Name = "Priority")]
      public Types.PriorityTypes Priority { get; set; }
  
      [Display(Name="Estimated time for completion")]
      public DateTime? DueDateTime { get; set; }
  
      [Display(Name="Date/Time")]
      public DateTime? CreatedDateTime { get; set; }
      public DomainUser CreatedBy { get; set; }
  
      [Display(Name = "Allocated To")]
      public HelpDeskMember AllocatedTo { get; set; }
      public DateTime? AllocatedDateTime { get; set; }
  
      public DateTime? ClosedDateTime { get; set; }
      public int? ClosedBy { get; set; }
  
      public DateTime? ReopenedDateTime { get; set; }
      public int? ReopenedBy { get; set; }
  
      public DateTime? DeletedDateTime { get; set; }
      public HelpDeskMember DeletedBy { get; set; }
  
      public Decimal? EstimatedInternalCost { get; set; }
      public Decimal? EstimatedResources { get; set; }
      public Decimal? RealInternalCost { get; set; }
      public Decimal? EstimatedExternalCost { get; set; }
      public Decimal? RealExternalCost { get; set; }
      public Decimal? EstimatedTotalCost { get; set; }
      public Decimal? RealTotalCost { get; set; }
  
      public string CostCode { get; set; }
  
      public string TimeRequired { get; set; }
      public string ActualTimeTaken { get; set; }
  
      public Types.StatusTypes Status { get; set; }
  
      public string Solution { get; set; }
  
      public bool UserSignedOff { get; set; }
  
      public bool OverdueEmailSent { get; set; }
      public bool EscalatedEmailSent { get; set; }
  
      public ICollection&lt;Note&gt; Notes { get; set; }
      public ICollection&lt;Attachment&gt; Attachments { get; set; }
      public ICollection&lt;HistoryItem&gt; History { get; set; }
  
      public Incident()
      {
          Notes = new List&lt;Note&gt;();
          Attachments = new List&lt;Attachment&gt;();
          History = new List&lt;HistoryItem&gt;();
      }
  }
  </code></pre>