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

  • Home
  • SEARCH
  • 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 9266307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T14:17:16+00:00 2026-06-18T14:17:16+00:00

I need to create a virtual association between these two entities (1-*) so that

  • 0

I need to create a “virtual” association between these two entities (1-*) so that I can traverse them using linq, but the problem is I cannot touch the database. I have tried to manually edit the edmx many times without success, getting various mapping errors.

enter image description here

EDMX:

<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="2.0" xmlns:edmx="http://schemas.microsoft.com/ado/2008/10/edmx">
    <!-- EF Runtime content -->
    <edmx:Runtime>
        <!-- SSDL content -->
        <edmx:StorageModels>
        <Schema Namespace="DataAccess.SD.Store" Alias="Self" Provider="Devart.Data.Oracle" ProviderManifestToken="ORA" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns="http://schemas.microsoft.com/ado/2009/02/edm/ssdl">
                <EntityContainer Name="SDModelsStoreContainer">
                    <EntitySet Name="CUSTOMER" EntityType="DataAccess.SD.Store.CUSTOMER" store:Type="Tables" Schema="PINNACLE" />
                    <EntitySet Name="EQUIPMENT" EntityType="DataAccess.SD.Store.EQUIPMENT" store:Type="Tables" Schema="PINNACLE" />
                </EntityContainer>
                <EntityType Name="CUSTOMER">
                    <Key>
                        <PropertyRef Name="CUSTOMEROID" />
                    </Key>
                    <Property Name="CUSTOMEROID" Type="int64" Nullable="false" />
                    <Property Name="CUSTOMER_NAME" Type="VARCHAR2" MaxLength="40" />
                    <Property Name="CUSTOMER_ACCOUNT" Type="VARCHAR2" MaxLength="20" />
                </EntityType>
                <EntityType Name="EQUIPMENT">
                    <Key>
                        <PropertyRef Name="EQUIPMENTOID" />
                    </Key>
                    <Property Name="EQUIPMENTOID" Type="int64" Nullable="false" />
                    <Property Name="OWNER_ID" Type="VARCHAR2" Nullable="false" MaxLength="30" />
                    <Property Name="EQUIPMENT_ID" Type="VARCHAR2" MaxLength="100" />
                </EntityType>
            </Schema></edmx:StorageModels>
        <!-- CSDL content -->
        <edmx:ConceptualModels>
            <Schema Namespace="DataAccess.SD" Alias="Self" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns="http://schemas.microsoft.com/ado/2008/09/edm">
                <EntityContainer Name="SDContext" annotation:LazyLoadingEnabled="true">
                    <EntitySet Name="Customers" EntityType="DataAccess.SD.Customer" />
                    <EntitySet Name="Trailers" EntityType="DataAccess.SD.Trailer" />
                </EntityContainer>
                <EntityType Name="Customer">
                    <Key>
                        <PropertyRef Name="Id" />
                    </Key>
                    <Property Name="Id" Type="Int64" Nullable="false" />
                    <Property Name="Name" Type="String" MaxLength="40" Unicode="false" FixedLength="false" />
                    <Property Name="AccNo" Type="String" MaxLength="20" Unicode="false" FixedLength="false" />
                    </EntityType>
                <EntityType Name="Trailer">
                    <Key>
                        <PropertyRef Name="Id" />
                    </Key>
                    <Property Type="Int64" Name="Id" Nullable="false" />
                    <Property Type="String" Name="Number" MaxLength="100" FixedLength="false" Unicode="false" />
                    <Property Type="String" Name="Customer_Id" Nullable="false" MaxLength="30" FixedLength="false" Unicode="false" />
                    </EntityType>
            </Schema>
        </edmx:ConceptualModels>
        <!-- C-S mapping content -->
        <edmx:Mappings>
            <Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2008/09/mapping/cs">
                <EntityContainerMapping StorageEntityContainer="SDModelsStoreContainer" CdmEntityContainer="SDContext">
                    <EntitySetMapping Name="Customers">
                        <EntityTypeMapping TypeName="DataAccess.SD.Customer">
                            <MappingFragment StoreEntitySet="CUSTOMER">
                                <ScalarProperty Name="Id" ColumnName="CUSTOMEROID" />
                                <ScalarProperty Name="Name" ColumnName="CUSTOMER_NAME" />
                                <ScalarProperty Name="AccNo" ColumnName="CUSTOMER_ACCOUNT" />
                                </MappingFragment>
                        </EntityTypeMapping>
                    </EntitySetMapping>
                    <EntitySetMapping Name="Trailers">
                        <EntityTypeMapping TypeName="DataAccess.SD.Trailer">
                            <MappingFragment StoreEntitySet="EQUIPMENT">
                                <ScalarProperty Name="Number" ColumnName="EQUIPMENT_ID" />
                                <ScalarProperty Name="Customer_Id" ColumnName="OWNER_ID" />
                                <ScalarProperty Name="Id" ColumnName="EQUIPMENTOID" />
                            </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/2008/10/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" />
            </DesignerInfoPropertySet>
        </Options>
        <!-- Diagram content (shape and connector positions) -->
        <Diagrams>
            <Diagram Name="SD" ZoomLevel="100">
                <EntityTypeShape EntityType="DataAccess.SD.Customer" Width="1.75" PointX="0.75" PointY="0.75" Height="1.59568359375" IsExpanded="true" />
                <EntityTypeShape EntityType="DataAccess.SD.Trailer" Width="1.75" PointX="3.125" PointY="0.75" Height="1.59568359375" />
                <AssociationConnector Association="DataAccess.SD.CustomerTrailer">
                    <ConnectorPoint PointX="2.5" PointY="1.7064925130208335" />
                    <ConnectorPoint PointX="4" PointY="1.7064925130208335" />
                </AssociationConnector>
                <AssociationConnector Association="DataAccess.SD.CustomerTrailer">
                    <ConnectorPoint PointX="2.5" PointY="1.6439925130208335" />
                    <ConnectorPoint PointX="3.125" PointY="1.6439925130208335" />
                </AssociationConnector>
            </Diagram>
        </Diagrams>
    </Designer>
</edmx:Edmx>

What do I need to do exactly?

  • 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-18T14:17:17+00:00Added an answer on June 18, 2026 at 2:17 pm

    In the edmx designer you just need need to right click and choose Add New >> Association. Make sure you untick the “Add foreign key properties…” option, and select your required entities and navigation property names.

    Then select the association and in the properties pane click into the “Referential Constraint” option – here you can set up which fields are involve in the association. You’ll also want to set the correct multiplicity in the properties pane.

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

Sidebar

Related Questions

I am using Arch linux and I need to create virtual serial port on
I need create clone repository. but I do not know where can I get
I need to create a view that automatically adds virtual row number in the
I need to create a virtual file, a file that if some program access
I need to create a Cocoa app that will create a virtual serial port
I need to create a virtual printer that 'shreds' Basically here is my problem.
I need create a document word with Java. And I ask, how can I
Need to create a custom DNS name server using C which will check against
How can I create a virtual HID device in code? I'm trying to avoid
I need to create a console application that has a main() function and pop

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.