Hi at all, i have downloaded DataObject but I'm very confused about how it work.

I want to draw my Classes with an editor (like the free UML tools over the internet). After that, the editor can build the class (c#) for my Project.

After that these class can be used with DataObject without any modify?

DataObject have an integrated Editor in order to build visually the class?

darez

This thread was imported from our support forum. The original discussion may contain more detailed answer. Original topic by darez.

asked Apr 09 '10 at 11:35

Editor's gravatar image

Editor
46156156157


One Answer:

> After that these class can be used with DataObject without any modify?

You need to add the following attributes:

  • [HeriarchyRoot] to each root type of each inheritance hierarchy. In simplest case (no inheritance) it must be added to the only class there.

  • [Key] to each field that is a part of primary key

  • [Field] to each property that must be persisted (~= persistent field).

Everything else is optional. E.g.:

  • [Association] allows to describe bi-directional associations (in this case DO will ensure both ends are always in sync). In addition, it allows to specify how the other pair of association must behave in case of removal on one of its ends.

  • [Index] on class to declare indexes you need

  • etc.; everything else is described here: http://goo.gl/Yihp

> DataObject have an integrated Editor in order to build visually the class?

No. But you can use Visual Studio class designer, if you like.

Practically it is much faster to write the classes using VS.NET code editor, and further add them to class diagrams, if you need them (e.g. for technical discussions). DataObjects.Net requires only few attributes, so it's almost the same case as with regular classes, which are almost never designed using class diagram editor.

answered Apr 11 '10 at 18:30

Alex%20Yakunin's gravatar image

Alex Yakunin
29714412

Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview

Subscription:

Once you sign in you will be able to subscribe for any updates here

Tags:

×574

Asked: Apr 09 '10 at 11:35

Seen: 2,118 times

Last updated: Apr 09 '10 at 11:35

powered by OSQA