locked
how to arrange my data classes in entity Farmework 4.1 RRS feed

  • Question

  • Hello everyone 

    i'm just starting a new project that included same objects in C# with using entity FrameWork 4.1.

    the classes:

    1-project:(project details, client, list of(workers),list of( materials),list of( work type)).

    2-client:(client details).

    3-worker(worker details).

    3-material(material detalis).

    4-supplier(supplier detalis, list of (materials)).

    5- work type(computation to each work).

     

    the question is, how i should to separate the classes to correct arrange the data in my database in entity Farmework 4.1 and who is gonna be the Unique key and foreign key for each class.

    code examples will be very helpful.

    regards.

    • Moved by Andreas Johansson Friday, August 12, 2011 9:26 AM EF question (From:.NET Framework Setup)
    Friday, August 12, 2011 9:09 AM

Answers

  • On 8/12/2011 5:09 AM, gilix1 wrote:
    > Hello everyone
    >
    > i'm just starting a new project that included same objects in C# with
    > using entity FrameWork 4.1.
    >
    > the classes:
    >
    > 1-project:(project details, client, list of(workers),list of(
    > materials),list of( work type)).
    >
    > 2-client:(client details).
    >
    > 3-worker(worker details).
    >
    > 3-material(material detalis).
    >
    > 4-supplier(supplier detalis, list of (materials)).
    >
    > 5- work type(computation to each work).
    >
    > the question is, how i should to separate the classes to correct arrange
    > the data in my database in entity Farmework 4.1 and who is gonna be the
    > Unique key and foreign key for each class.
    >
    > code examples will be very helpful.
     
    You should have figured that out at the database level by creating
    tables with primary and foreign key constraints well before you got to
    the model.
     
    Friday, August 12, 2011 1:56 PM