This is a migrated thread and some comments may be shown as answers.

Code Generator support for Abstract Classes in Fluent Model

2 Answers 56 Views
Feature Requests
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Paul
Top achievements
Rank 1
Paul asked on 09 Sep 2014, 03:18 PM
I would like to see improved metadata support for interpreting class definitions in the Telerik Code Generator.

When I define an abstract base class in my Fluent database model, the Data Service Wizard is unaware that the class was abstract.  My goal is to customize the T4 templates to provide a complete DTO mapping for my inheritance structure, but the CodeClass.TypeInheritanceModifer property does not reflect the fact my class was declared abstract, so I am unable to declare the associated DTO as abstract.

2 Answers, 1 is accepted

Sort by
0
Accepted
Kristian Nikolov
Telerik team
answered on 12 Sep 2014, 09:57 AM
Hi Paul,

Thank you for contacting us.

The behavior you are experiencing is a known limitation of the Service Wizard. Normally the  TypeInheritanceModifer property will indicate whether the class is abstract or not. However as you have noticed in a scenario where a Fluent Model is used, at the time of generation this is not the case. The reason for this is that when Fluent Model is used the Service Wizard does not have the required metadata for this property. This unfortunately means that currently you would be unable to generate abstract DTO`s for abstract classes.

As we are always looking for ways to improve Telerik Data Access we suggest you post a feature request at our Feedback Portal and vote for it. Doing so will help us prioritize its eventual implementation.

I hope this helps. Should you have further questions do not hesitate to use our forums again.

Regards,
Kristian Nikolov
Telerik
 
OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
 
0
Paul
Top achievements
Rank 1
answered on 12 Sep 2014, 03:44 PM
Thanks Kristian.

I have submitted the feature request to your feedback portal as you suggested.

http://feedback.telerik.com/Project/114/Feedback/Details/137789-code-generator-typeinheritancemodifier-support-for-fluent-models

Cheers,
Paul S.
Tags
Feature Requests
Asked by
Paul
Top achievements
Rank 1
Answers by
Kristian Nikolov
Telerik team
Paul
Top achievements
Rank 1
Share this question
or