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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T18:36:52+00:00 2026-06-13T18:36:52+00:00

I have a UML class diagram with 2 classes A and B in enterprise

  • 0

I have a UML class diagram with 2 classes A and B in enterprise architect (example simplified). The class diagram shows an association between A and B. The association is 0..1 To 0..m for A and B respectively. This means that A can have 0 … m B instances and B belongs to 0 or 1 A instance. I generated this C# code with the enterprise architect (simplified):

class A
{
   public B _b;
}

class B
{

}

However, shouldn’t it rather be:

class A
{
   public IList<B> _bs;
}

class B
{

}

Is there anything I have to consider during code generation (I also selected both classes and than generated the code without success).

  • 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-13T18:36:53+00:00Added an answer on June 13, 2026 at 6:36 pm

    Go to Tools – Options – Source Code Enineering – C# and click the Collection Classes button to specify the collection classes used for code generation (ignore the 1..* label).

    You specify multiplicity properties (ordered etc) in the connector’s Properties, on the Target Role tab (I’m pretty sure EA will ignore the 0..1 multiplicity on the Source Role; there isn’t really a lot it could do with it).

    Finally, make sure all your classes and packages are specified as C#. Easiest way is to right-click the package in the project browser and select Code Engineering – Reset Options for this Package, then in the dialog specify “Where language is <All>”, “Convert to C#” and Process Child Packages.

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

Sidebar

Related Questions

in UML Class Diagram i have lots of classes that Implements one Class IComponent.
I have read some UML class diagram. I see some UML design this way:
I have following UML class diagram and java coding for each, please tell me
I have created a UML diagram and generated a class by using Generate Code
I'm making an UML class diagram and I don't know how to do this:
I have a class diagram which i created using Star Uml but now the
If you've ever used Visio or a UML class diagram editor, you have an
I have created a complex UML class diagram in my VS2010 IDE. I am
I have a class in UML that looks like this (it's in German, but
With Enterprise Architect (Version 9.2), I created some Class and Sequence UML Diagrams. Now

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.