Change generation directory for Telerik DTO template

Thread is closed for posting
2 posts, 0 answers
  1. Noe
    Noe avatar
    1 posts
    Member since:
    Oct 2012

    Posted 25 Apr 2013 Link to this post

    Hi, I hope this question not be silly =P.
    I'm using the telerik dto generation template provided for telerik for vb .net.
    I need to be able to specify the directory for the generation of the dto classes and the repository classes in an independant way. This is because I don't want to have the telerik.openaccess reference in the bussiness entities layer; so I need to split them. Is this possible? 
  2. Dimitar Tachev
    Dimitar Tachev avatar
    67 posts

    Posted 30 Apr 2013 Link to this post

    Hi Noe,

    Reviewing the information that you provided us I suppose that you are using our Add OpenAccess Service wizard for generating a Plain service and you want to move the DTO classes to other application independent of the OpenAccess assembly reference - your business layer.

    The wizard code generation cannot be configured to separate the files in different projects but as it is using a one-time code generation the easiest way to achieve your needs is by manually moving the Transport.vb file to your business layer. This should be a safe operation because it is containing only your DTO classes without any dependencies of the OpenAccess assemblies.

    Please bear in mind that you should add reference to System.Runtime.Serialization in the project where you move the Transport.vb file and to import the DTOs namespace in the Services.vb, 
    IEntitiesModelService.vb and Assemblers.vb files.

    Regarding the Repositories.vb file it cannot be moved to your business layer because it is depending on the ObjectKey and the IUnitOfWork classes from the OpenAccess assembly.

    You could find more information about the Plain Services in this documentation section.

    I hope this is applicable for you. Do not hesitate to contact us back if you need any further assistance.

    Kind regards,
    Dimitar Tachev
    the Telerik team
    OpenAccess ORM Q1'13 SP1 update is out now. Take a glimpse at the highlights >>
Back to Top