v5 Example

Posts   
 
    
hotmail
User
Posts: 47
Joined: 06-Feb-2013
# Posted on: 30-Aug-2016 06:38:57   

Hello, We are just starting to look at v5. We have been using LLBL gen for last 10 Years.

Will there be any Example projects/videos.... for v5 especially with new feature and best practices? like I see it under v4?

I wanted to see examples on how we could use Derived Model DTO instead of Entity and Entity Collection in Web Api.

Thanks

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 30-Aug-2016 09:06:32   

Hi there,

AFAIK, there are no example packages specifically for v5. The v4 examples you are referring are mostly on the LLBLGen runtime framework.

Anyway, a good starting point is to check out The documentation. There you will find examples as well. Interesting documentation topics:

David Elizondo | LLBLGen Support Team
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 30-Aug-2016 09:29:27   

The v4 examples are ported to v5 (https://github.com/SolutionsDesign/LLBLGenProExamples_5.x), but there's not an example for derived models. This forum system (HnD) is currently being ported to v5 and rewritten, however it's a big project so it will take a while before that's released.

As David said, we included many examples in the docs themselves. E.g. http://www.llblgen.com/Documentation/5.0/Derived%20Models/dto_llblgen.htm

We think for the service side things are always the same, i.e. the dto coming in with values for updates/inserts, and the dto's going out with a projection fetch for GET requests on the service.

Frans Bouma | Lead developer LLBLGen Pro
Posts: 19
Joined: 29-Jun-2017
# Posted on: 13-Jul-2017 01:50:08   

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.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 13-Jul-2017 08:48:45   

FrankMonroe wrote:

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.

No specific example about this on v5, but as mentioned before, it's more about how you use the generated code.

FrankMonroe wrote:

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.

Just add the desire new property to a partial class.

FrankMonroe wrote:

Any guidance much appreciated. Thank you. Great product! Derived Model seems to be new in v5?!? Am I right ? That's a great feature.

Thanks for the feedback. Yes, Derived model is new for v5.

David Elizondo | LLBLGen Support Team