I'm very new to netTiers. I've used some similar frameworks before, but none have been quite as comprehensive. Looks like I'll be sticking around.
I'm having trouble figuring out when to create dependent objects.
First of all, should I do it in the service or in the object itself?
If in the object, then how do I "catch" the various CRUD operations? The object does not have overridable Insert, Update, etc. methods.
If in the service, then how do I develop unit tests for it? The unit tests generated by the templates all work on the DataRepository directly, and therefore bypass the service methods.
Here's a simple example of what I'm trying to accomplish. I have two tables: Role and Alias. The Role table has an AliasId column with a foreign key contraint. The alias is transparent to the end-user and is modified only behind-the-scenes, as it were. The Name field of the Alias always matches the Name field of the Role. So when a Role object is created, the RoleService (or whatever) should create the matching Alias object and record. Similarly, when a role is renamed, the associated Alias has to be renamed as well.
So what's the "right way" to do it?
Thanks for any help!