Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: generate poco only for some dynamic365 entities #29

Closed
kashcode opened this issue Oct 31, 2019 · 7 comments
Closed

Question: generate poco only for some dynamic365 entities #29

kashcode opened this issue Oct 31, 2019 · 7 comments
Labels

Comments

@kashcode
Copy link

Is there any options to generate poco for certain dynamic365 entities? Actually I don't need all ~3591 in my case, but only some.

@moh-hassan
Copy link
Owner

Welcome to Odata2Poco project.
Filter option will be added to the next release. The filter option will enable of including only some entities
Something like:

//comma delimited list
--include entity1,Mynamespace.Person,....

@moh-hassan
Copy link
Owner

moh-hassan commented Nov 19, 2019

A new package v3.3.0 is released that fix your issue.

The new features:

You can download:

Try the filter option using --include

o2pgen -r http://services.odata.org/V4/TripPinServiceRW -v --include air* 

How to use: read wiki
Let me know if that version fixes your issue.

@arthuronoszko
Copy link

I actually have a question regarding this include functionality. I tried minimizing the number of entities to generate based on a XML metadata document, and the classes were generated fine. The problem was that no other classes were generated, for example the ones that were specified as properties in the class i wanted to generate. Will try to show with an example also :)

var pocoSetting = new PocoSetting
{
    Include = new List<string> { "account" },
};

This generated the Account class, but not the classes of the properties in Account, example:

public partial class Account : crmbaseentity 
{
    public principal ownerid {get;set;} 
}

(In this example, both crmbaseentity and principal are not being generated)

Is there a way to say to the library that also generate the classes that are being used by the Entities specified in include?
For more information, i am trying to generate c# classes for a Dynamics 365 installation using the $metadata document.

Thanks!

@moh-hassan
Copy link
Owner

@arthuronoszko
Thanks for posting the issue.
I'll fix this issue in the next release.

@arthuronoszko
Copy link

@arthuronoszko
Thanks for posting the issue.
I'll fix this issue in the next release.

Thanks for super quick reply :) Sounds awesome!

@moh-hassan
Copy link
Owner

Hi @arthuronoszko
A new release v5.0.1 is published in nuget and the feature with many others is available :).

@arthuronoszko
Copy link

Hi @arthuronoszko
A new release v5.0.1 is published in nuget and the feature with many others is available :).

Awesome, will upgrade! Thanks for an awesome tool and super quick fix :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants