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 8883007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:42:45+00:00 2026-06-14T20:42:45+00:00

This is about Entity Framework 5 RTM Code First. When I map an entity

  • 0

This is about Entity Framework 5 RTM Code First.

When I map an entity having an existing enum I get this error:

No corresponding object layer type could be found for the conceptual
type ‘[FULL ENUM TYPE NAME]’

Actually it looks for the whole enum in the same namespace of the DbContext.

Some other question (Using Enums with Code First & Entity Framework 5) had an answer that pointed to some blog post where there’s a how-to on how to get this working but it talks about Database-First/Model-First approach.

How can I add an EDM enum type using Code-First approach?

  • 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-14T20:42:46+00:00Added an answer on June 14, 2026 at 8:42 pm

    I am afraid it isn’t possible right now – there is known bug in the EF5 http://entityframework.codeplex.com/workitem/532, that is causing the mentioned error.

    I was struggling with the similar problem and didn’t find any elegant solution. I ended up with int column instead of enum column.

    Edit (problematic model):

    Core assembly:

    public enum UserStatus { Approved, Disabled }
    
    public interface IUser {
        public int ID { get; }
        public string Username { get; set;}
        public UserStatus Status { get; set;}
    }
    

    Users assembly:

    public class User : IUser {
        public int ID { get; protected set; }
        public string Username { get; set; }
        public UserStatus Status { get; set; }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

nobody loved my first question about this: Creating Entity Framework objects with Unity for
I've a question about Entity Framework. In a code first scenario I have a
I read this post about mocking Entity Framework(EF) . Shouldn't we abstract the entities'
This might be a stupid question. I have no idea about MS Entity Framework
I'm using a DB first approach, using Entity Framework and I've just read this
I just read this article about the Entity Framework 4 (actually version 2). Entity
I was reading this article about ADO.NET Entity Framework and found it to be
This seems like it should be quite obvious but something about the entity framework
I've project using Entity Framework 5 Code First, WebApi, ASPNET MVC 4, Repository and
i have this question about Visual Studio 2010 entity framework designer. Is there a

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.