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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:09:37+00:00 2026-06-13T08:09:37+00:00

Added a Database and an Entity Model to my DAL Project. got an error

  • 0

Added a Database and an Entity Model to my DAL Project.

got an error :

Error :

 +      base    {"Schema specified is not valid. Errors: \r\nMultiple types with the name 'TblRecord' exist in the EdmItemCollection in different namespaces.  Convention based mapping requires unique names without regard to namespace in the EdmItemCollection."}   System.Data.EntityException {System.Data.MetadataException}

The Edmx File

<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="3.0" xmlns:edmx="http://schemas.microsoft.com/ado/2009/11/edmx">
  <!-- EF Runtime content -->
  <edmx:Runtime>
    <!-- SSDL content -->
    <edmx:StorageModels>
      <Schema Namespace="Xz.Business.Matches.Store" Alias="Self" Provider="System.Data.SqlServerCe.4.0" ProviderManifestToken="4.0" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
        <EntityContainer Name="XzBusinessMatchesStoreContainer">
          <EntitySet Name="Records" EntityType="Xz.Business.Matches.Store.Records" store:Type="Tables" />
        </EntityContainer>
        <EntityType Name="Records">
          <Key>
            <PropertyRef Name="Record" />
          </Key>
          <Property Name="Record" Type="nvarchar" Nullable="false" MaxLength="100" />
          <Property Name="Relations" Type="nvarchar" MaxLength="450" />
        </EntityType>
      </Schema>
    </edmx:StorageModels>
    <!-- CSDL content -->
    <edmx:ConceptualModels>
      <Schema Namespace="Xz.Business.Matches" Alias="Self" p1:UseStrongSpatialTypes="false" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns:p1="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
        <EntityContainer Name="RecordzEntities" p1:LazyLoadingEnabled="true">
          <EntitySet Name="Records" EntityType="Xz.Business.Matches.TblRecord" />
        </EntityContainer>
        <EntityType Name="TblRecord">
          <Key>
            <PropertyRef Name="Record" />
          </Key>
          <Property Name="Record" Type="String" Nullable="false" MaxLength="100" Unicode="true" FixedLength="false" />
          <Property Name="Relations" Type="String" MaxLength="450" Unicode="true" FixedLength="false" />
        </EntityType>
      </Schema>
    </edmx:ConceptualModels>
    <!-- C-S mapping content -->
    <edmx:Mappings>
      <Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2009/11/mapping/cs">
        <EntityContainerMapping StorageEntityContainer="XzBusinessMatchesStoreContainer" CdmEntityContainer="RecordzEntities">
          <EntitySetMapping Name="Records">
            <EntityTypeMapping TypeName="Xz.Business.Matches.TblRecord">
              <MappingFragment StoreEntitySet="Records">
                <ScalarProperty Name="Record" ColumnName="Record" />
                <ScalarProperty Name="Relations" ColumnName="Relations" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
        </EntityContainerMapping>
      </Mapping>
    </edmx:Mappings>
  </edmx:Runtime>
  <!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
  <Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
    <Connection>
      <DesignerInfoPropertySet>
        <DesignerProperty Name="MetadataArtifactProcessing" Value="EmbedInOutputAssembly" />
      </DesignerInfoPropertySet>
    </Connection>
    <Options>
      <DesignerInfoPropertySet>
        <DesignerProperty Name="ValidateOnBuild" Value="true" />
        <DesignerProperty Name="EnablePluralization" Value="True" />
        <DesignerProperty Name="IncludeForeignKeysInModel" Value="True" />
        <DesignerProperty Name="CodeGenerationStrategy" Value="None" />
      </DesignerInfoPropertySet>
    </Options>
    <!-- Diagram content (shape and connector positions) -->
    <Diagrams></Diagrams>
  </Designer>
</edmx:Edmx>

Names & Namespaces :

Project Name : Business.Matches
Default Namespace : Xz.Business.Matches

I added an Entity Model with this definitions :

Model : RecordzModel

Context : RecordzContext

Model Namespace : Xz.Business.Matches

  • 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-13T08:09:38+00:00Added an answer on June 13, 2026 at 8:09 am

    You seem to have more than one class in your project that is called ‘TblRecord’. Namespaces are ignored when matching your types to EDM types for POCO types and therefore if you have more than one class with the same name it is ambiguous and causes the exception.

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

Sidebar

Related Questions

I've added a entity framework model from a database using the wizard called EnterpriseDownloadRepository.edmx
I added a bunch of foreign keys to the database project when previously there
I've inherited a project which uses Entity Framework Database First. I'm trying to work
I created a new MVC application and added an Entity Framework model generated from
I've added and designed an ADO.NET Entity Data Model (.edmx) and have generated the
My situation I have an entity model with a base class ItemBase which defines
I am pre-generating views for the entity data model in my project; following the
in a C# project, using EF Database first I've added a foreign key to
I have a MySQL user added to a database that I would like to
I try to delete a record in Gridview and Database .I added a boundfield

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.