moh-hassan/odata2poco

OData2Poco Class library

darinvanatta opened this issue · 16 comments

I'm trying to understand how to use the project as a library.

I see this comment on the project page but it appears an image is missing

image

I can't find anything else. Are you saying it's compile it to a dll and use it that way?

OData2Poco is a class library project compiled to dll and referenced by o2pgen /dotnet-o2pgen

I generated the class library OData2Poco as a nuget package.
You can try it from the download in github.
A new demo project is added to the repository to show how to use OData2Poco programmatically.
Also, a T4 template is available in the demo.
Let me know for any help needed.

That demo project is just what I was looking for!

I'm getting a compile error after downloading the latest: "Enabling license acceptance requires a license url"

image

I disabled license acceptance
Download a new version 3.1.0.360
The demo as a zip file

Any ideas on this error?

image

Steps to use the class library in the demo:

  • Download from github (it's not yet published to nuget Gallery, so use it as a local package)

  • Define a local source for packages e.g, in F:\nuget_local using the Package Manager console.
    -Add the package to the local source by the command nuget add (modify the path in the command:

                nuget add G:\local_nuget/OData2Poco.3.1.0.nupkg -Source F:\nuget_local
    

Then you you get:

Installing OData2Poco 3.1.0.Successfully added package 'G:\local_nuget/OData2Poco.3.1.0.nupkg' to feed 'F:\nuget_local'.

  • Be sure to activate only the local source in the package Manager console(to avoid download from nuget Gallery).

-Install the package by the command:

 install-package OData2Poco 
  • You find the package is added to your csproj file.

Also, There is a direct simple way,
The package is a zip file. You can unzip OData2Poco.3.1.0.nupkg and reference the dll from the lib folder (select net45/net461 or nestandard2)

That is a much simpler way.

It worked great without auth2 but error when I try auth2. Am I setting the values correctly?

image

set ServiceUrl

      ServiceUrl="https://con813-crm612cf723bbf35af6devaos.cloudax.dynamics.com/data"

I think it may be worked without oauth2 because you have already logged in to the service. Try it from other client (not logged in before).

It got further....

image

I try in my side, but it seem that the service isn't available. I can't connect?

Yes... I didn't notice the VM shut down on it's schedule. I re-started the VM and it ran for quite a while and then this message.

image

It's working in my side using oauth2 and token
Try it.

Success! Thank you.

Glad that you succeeded.
Best regards;

Odata2Poco Class library v3.1.0 is published and available in nuget Gallery for download