
25 Answers, 1 is accepted
We are starting to work on that, this is exactly the same as our idea where we should go in the future. We will do that I guess even prior to Q2 2010 release.
Regards,
Dimitar Kapitanov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.

Yes this is exactly the idea we have, just the API will be maybe a bit different. Sorry for the late reply we are really gearing up for the next maintenance release we will make few weeks from now.
Best wishes,
Dimitar Kapitanov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.

This would really be great. We are doing this all the time in our WCF archiecture right now. On lower layers (business and repository) work is done on the OA persistent instances, but before anything goes up to the WCF layer on top of the business layer OA persistent instances are converted to a DataContract class instance.
The DC class instance pretty much mimics the properties of the "real" persistent object. However, in some situations things are done to "tweak" the DC class:
1) Get rid of back references in 1:m relationships.
When you have a highly navigation persistent model, where you can navigate in all directions your DC class might not need this. For example when you have and Order->OrderLines relationsship you can have a collection on the Order class and a reference back to the Order on the OrderLine class on the persistent level... but on DC level, you only need the Order-OrderLines navigation..thus you never (on DC level) go from OrderLine to Order
These cyclic references must indeed be avoided (if you don't wanna do anything special during serialization) when using WCF, since serialization will go on and on forever.
2) "Mark" which properties you want in the DC class from the original persistent object
Either do this by convention (name of property for example) or configuration (attribute on the PC class field, which describes what DC class this pc field maps to)
The ideal signature could be something like this:
// Mapping from a pc class to a dc class (full customer object as DC)
DC.Customer customer = Mapper<PC.Customer, DC.Customer>.Map(pcCustomerInstance)
// Mapping from a pc class to a dc class (simple customer object as DC)
DC.Customer customer = Mapper<PC.Customer, DC.SimpleCustomer>.Map(pcCustomerInstance)
Where the two generics in the last is the Persistent class you want to map from and the DC class you want to map to. If you use the first signature you'll get the full conversion to the DC.Customer
Similar you can do it the other way around when you want to map from DC class to PC class
PC.Customer customer = Mapper<DC.Customer, PC.Customer>.Map(dcCustomerInstance)
Just my few cents...
Regards
Henrik
Thanks for the suggestions, they will be taken into account when we progress further with this development.
Greetings,
Dimitar Kapitanov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.

Have a look at Automapper:
http://www.lostechies.com/blogs/jimmy_bogard/archive/2009/01/22/automapper-the-object-object-mapper.aspx
http://automapper.codeplex.com/Wikipage
Thanks for the suggestion will do.
Greetings,
Dimitar Kapitanov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.

sometime ago I wrote this to you guys:
"I know that on the next release, Open Acess will have automatic DTO's. So instead of creating the Assembler classes for transforming the Open Access data objects to our BO's, this will be done automatically correct?. Can you unveil anything about how it's going to work?"
Your answer was
"Unfortunately the DTOs will not be released together with the Q2 release as we didn't had the time to finalize all development there. However we will ship that really soon after the Q2 release. I would not go into details, except that we took the same approach as EntityFramework, and all such "upper layer" implementations will be released as T4 codegeneration templates, maybe together with wizards and helpers libraries. This approach allows really quick and succesful triage and problem resolution on your side - that way you will be able to fix/alter a lot of stuff even without waiting for an official drop of the templates. I hope that sheds some light on our intentions."
Any good news about the Automatic DTO's feature? We are already in Q1 2011...
Thanks.

There was a sample a few months back:
http://www.telerik.com/support/kb/orm/general/dto-templates-for-domain-models.aspx
If been using a customized version of that, however the 2001 Q1 release breaks those templates. I'm currently looking into using custom code generation to get the Dto classes generated along with the normal classes. I might share that when I'm done.
I've got a feature related request though. I'd like to be able to set custom properties on classes and fields in the model designer, so I can use these properties in my own templates. One of the things I want to do is to use that to decide whether certain collections should be included in the Dto.

Looks like that those features takes forever to be included into that product.
I got the feeling that the OA Product didn't have the attention like the UI controls Products.
I for myself switched a year ago to Lightspeed (Mindscape) I am happy with them.
We are currently working on the new templates, which will work with the Q1 version of OpenAccess. In this version we have introduced a few breaking changes in the code generation which make the current dto templates unusable. The new templates will be uploaded tomorrow, please excuse us for the delay.
Regards,
Alexander
the Telerik team

Error 3 Compiling transformation: 'Microsoft.VisualStudio.TextTemplating6B22AE572AF3D1455862D16725A4CA42.GeneratedTextTransformation' does not contain a definition for 'MetaModel' and no extension method 'MetaModel' accepting a first argument of type 'Microsoft.VisualStudio.TextTemplating6B22AE572AF3D1455862D16725A4CA42.GeneratedTextTransformation' could be found (are you missing a using directive or an assembly reference?) h:\MyPath\Includes\General.ttinclude 21 24 Miscellaneous Files
Any solution? Thanks.
The currently uploaded templates do not work with the Q1 version of OpenAccess. Unfortunately we are experiencing some technical problems with uploading the new templates in the KB article, that is why I have attached them to this post.
Please note that the Includes folder is no longer needed in the project, you need only the Telerik.OpenAccess.DTO.tt file. Just make sure the file paths on lines 19 and 24-28 are correct and you can replace the old template with the new one. I hope that helps.
Kind regards,
Alexander
the Telerik team

In fact this problem has already been fixed. The language="C#v3.5" attribute was missing from the first line of the template, which caused those transformation problems in Visual Studio 2008. The updated templates can be downloaded from the KB article.
Kind regards,
Alexander
the Telerik team

The DTO generator and mapper was working smoothly until I updated to Q3 2011.
Now, no matter how many times I change the template or run the "Run custom tool" from the context menu, nothing happens.
Is there a fix for this?
Thanks very much.
Gianni Araco.
Are you using the DTO templates that were provided in the Knowledge Base article mentioned earlier in this thread? If that is the case, they should be compatible with the new release, so let us know what are the issues and we will assist you in resolving them. Try saving the template and send us any errors that occur.
Apart from those templates and following the great client interest in enhancing the Data Services Wizard, in Q3 release we have introduced a new OpenAccess ORM add-in, which will cover many of the features the Data Services Wizard lacks, like the DTO generation. The add-in is in beta version for the time being, therefore we are still shipping the DSW. However, since it fully supports WCF plain services by automatically generating DTO files, you can give it a try and let us know for your experience. You can start it through a context menu item of the RLINQ file or an ASP.NET project named "Generate OpenAccess Domain Model Service...".
I am looking forward to your feedback.
Ivailo
the Telerik team
Q3’11 of Telerik OpenAccess ORM is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

Sorry for the long delay.
I confirm that the template is working.
It is a problem between Visual Studio 2010 and Team Foundation Sever. When I run the template on checked-in files, it doesn't ask for check-out, nor says anything, so it seem it's not doing anything.
Best regards.
Gianni Araco

Maybe I've been a bit too eager to answer.
I have created a new project, and it created the files accordingly (hence the above answer).
But I need to modify an existing one. I checked-out all the autogenerated files, as well as the .tt, and run it.
I tryed even modifying the file (adding a character at th end of a line) and saving it.
In both cases, nothing happened, though in the .rlinq some tables have been changed. Only the Telerik.OpenAccess.DTO.cs have been regenerated.
I tried two more drastic procedures: remove and add the .tt again and create and entirely new project.
Surprise surpise... it didn't work! Now it doesn't generate anything... I'm rather puzzled.
In the new project, I tried refering to a different .rlinq and it worked. So it must be something in there.
But the rlinq project compiles without errors...
The .rlinq that worked has been generated after the installation of Q3, while the one that is not working was generated with Q2.
I've checked the project file, and it refers to the new .dll versions.
Out of desperation, I've tried creating a new .rlinq file for that database and... well, it doesn't generate the persistence class files!
I've had to remove the .rlinq from the project and create it again adding it as Telerik OpenAccess Domain Model file...
I'd gladly avoid having to create a new project just to update the DTOs, so If you have any advice, it will be much appreciated.
Thanks and best regards.
Gianni Araco
I would recommend you to use the new add-in I have mentioned in my previous post to generate your DTOs, instead of the templates. I think it will save you some time.
In case you prefer to carry on with the templates, let me know and I will change your forum post to another type of ticket communication so that you will be able to attach an archive with the problematic data access project and we can examine what exactly went wrong.
Ivailo
the Telerik team
Q3’11 of Telerik OpenAccess ORM is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

I want to generate DTOs out of the rlinq file but when I call the context menu there is nothing to choose...?!
I've the model and the context separated in two projects (dll's)
Thank you for help,
regards Norbert
Which version of OpenAccess do you have installed? We released the new Generate OpenAccess Domain Model Service wizard with the Q3 2011 release. You should also note that it is only available under Visual Studio 2010.
Also there is a somewhat sporadic known bug where sometimes the menu item is called "MRU Placeholder..." instead of the regular "Generate OpenAccess Domain Model Service...".
I hope this helps.
Serge
the Telerik team

I'm using latest version of T4 template for DTOs generation and in my datamodel I'm using vertical inheritance strategy for two tables.
The problem is that the DTO class code is generated correctly but the ancestor for the DTO class is not DTO class but the model class. I'm not so experienced with T4 templates and was not able to find out how to change the T4 template to do this. Can anyone give me a clue ?
Many thanks
Jirka
--edited
And there's also issue with generation of the Repository class ...
The templates used for generating a DTO layer, currently have trouble generating a model that has inheritance included. While we produce some results this a known issue that we will be working on for Q2. We are planning to getting the wizard out of beta by then, so any feedback about issues or things that can be improved will be welcomed.
It can turn out that implementing the inheritance support is quite some work. However these templates are intended to kick start your development. You shouldn't have much trouble modifying the generated code to serve your purposes. Keep in mind though that you might get your changes overridden if you generate the DTOs again.
I hope this helps.
Serge
the Telerik team

thanks for your answer. I'm actually using the procedure which you had described :) I was just wondering if there's another way how to acomplish this.
Looking forward for Q2 - or any usable beta version :)
Best regards
Jirka