Question: generate poco only for some dynamic365 entities
kashcode opened this issue · 7 comments
Is there any options to generate poco for certain dynamic365 entities? Actually I don't need all ~3591 in my case, but only some.
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,....
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.
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!
@arthuronoszko
Thanks for posting the issue.
I'll fix this issue in the next release.
@arthuronoszko
Thanks for posting the issue.
I'll fix this issue in the next release.
Thanks for super quick reply :) Sounds awesome!
Hi @arthuronoszko
A new release v5.0.1 is published in nuget and the feature with many others is available :).
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 :)