Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8853013
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:32:38+00:00 2026-06-14T13:32:38+00:00

I’m using EF 5.0 Code First, in a .NET 4 library. Trying to set

  • 0

I’m using EF 5.0 Code First, in a .NET 4 library. Trying to set a class member to be of an Enum type, but it doesn’t get persisted to the database, and no runtime exception occurs when EF is creating the database based on the code.

Of course, when I try to query against that Enum:

var departments = db.Departments
                    .Where(dep => dep.Name == DepartmentNames.English);

I get an exception saying:

The specified type member 'Name' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported.

I am using Microsoft’s example of an Enum use: http://msdn.microsoft.com/en-us/data/hh859576.aspx

Are Enum members not supported yet? Does EF 5.0 differs somehow when hosted by a .NET 4 environemt than when hosted by a .NET 5 one?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T13:32:39+00:00Added an answer on June 14, 2026 at 1:32 pm

    Enums where first introduced in EF 5 components that live in .NET Framework 4.5 (System.Data.Entity.dll). If you are using EF5 but target .NET Framework 4 there is no support for enums since they are not supported by the System.Data.Entity.dll that is part of .NET Framework 4. So, yes EF5 on .NET Framework 4 is scoped down when comparing to EF5 on .NET Framework 4.5. Some other features that are available when you target .NET Framework 4.5 but not available when you target .NET Framework 4 are spatial types, Table Valued Functions, strored procedures returning multiple resultsets and a couple more. An alternative is to move to EF6 (Alpha release shipped a few weeks ago) which does not depend on System.Data.Entity.dll and therefore supports all features that shipped in EF5 on both .NET Framework 4.5 and .NET Framework 4 plus some more (e.g. async on .NET Framework 4.5). EF6 is an open source project from Microsoft and you can find all details here: http://entityframework.codeplex.com/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
We're building an app, our first using Rails 3, and we're having to build
I'm making a simple page using Google Maps API 3. My first. One marker
I am reading a book about Javascript and jQuery and using one of the
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I am trying to understand how to use SyndicationItem to display feed which is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.