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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:28:38+00:00 2026-05-16T07:28:38+00:00

Given an Entity Data Model (EDMX) with Code Generation Strategy set to None, how

  • 0

Given an Entity Data Model (EDMX) with “Code Generation Strategy” set to “None”, how does EF determine which CLR types to map the conceptual model to?

I think I read somewhere that it just probes the assembly for types that match the conceptual model, but that was in reference to a CTP edition of EF. Is this still the case?
Can I control this process somehow?

In particular, I am in a scenario where I am moving a substantial codebase from using Linq2SQL to using POCO with EF 4.0. Thus, I have the Linq2SQL classes as well as my POCO classes, for now residing in the same assembly, but in different namespaces. I’m trying to have a smooth migration from L2S to EF so I would like to have the two frameworks run in parallel for a while. However, I get a runtime-error saying

The mapping of CLR type to EDM type is
ambiguous because multiple CLR types
match the EDM type ‘SomeType’.
Previously found CLR type
‘SomeNamespace.SomeType’, newly found
CLR type ‘SomeNamespace.POCO.SomeType’

where SomeNamespace is the namespace of the L2S entities. This error makes sense if EF is just probing for all types matching the conceptual model. Can I confine EF to only probe the SomeNamespace.POCO namespace? Or should I put my POCO objects in another assembly? Or should I take a third approach?

Thank you.

  • 1 1 Answer
  • 1 View
  • 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-05-16T07:28:39+00:00Added an answer on May 16, 2026 at 7:28 am

    Notice this comment from the ADO.NET team blog:

    Jeff 25 Feb 2010 9:10 AM @Derek

    This is intentional. You can put your
    POCO classes in whatever namespace
    you’d like. The Entity Framework’s by
    convention mechanism for detecting
    which properties on the entity match
    the properties of entities in your
    model does not use Namespace. What
    matters is that the type name (without
    namespace) matches the EntityType name
    in your model (edmx/csdl file).

    One area to watch out for is if you
    have multiple types with the same name
    but in different namespaces. Because
    we don’t account for namespace, we
    detect that we’ve found multiple types
    and we throw an exception.

    Jeff

    See this article:
    link text

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

Sidebar

Related Questions

Given the following Core Data Model: -> : to-one releationship ->>: to-many relationship Entity
At the moment I've got a big Entity Data Model (.edmx) with a database
Is it possible to do mass updates on a given entity in Core Data?
For a given entity set, say, WHO_TYPES, I want to limit the columns to
I am writing a small code generator which would read into an edmx file
I have a core data model with an entity called clients that is made
Given the following model: public class Foo { public int Id { get; set;}
What changes do I need to make to get my entity data model to
Given this code: public class Car { public virtual int CarId { get; set;
I've got the following ADO.NET Entity Framework Entity Data Model: I want to find

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.