Newbie (started using the product a couple of weeks ago) asking:
... I wanted to see examples on how we could use Derived Model DTO ... in Web Api.
... but there's not an example for derived models.
I'm not even sure I am using the proper terms in this question:
The generated DtoClasses are Partial Classes (eg _Project_DTO and _Project_DTO.Persistence). Say for example it contains the Person partial class. Say I want to add properties/methods/validations to this Class.
Here's a simple example: the generated Person partial Class contains 'PhoneNumber' which is a BingInt (in the database) or Int64 (in the generated Class); I want to add a property 'FormattedPhoneNumber' which is a string. Of course I can't modify the generated partial class (cause I'd loose my changes every time the code is generated).
What is the proper best practise to follow? Add a new file (eg ProjectDTO.PartialClasses) with a partial Class definition with the new property in the same Namespace ? Anything to worry about with the .Persistence Class? etc.. Are there examples out there? I looked at the documentation with no success.
Any guidance much appreciated. Thank you. Great product! Derived Model seems to be new in v5?!? Am I right ? That's a great feature.