All Projects → moh-hassan → odata2poco

moh-hassan / odata2poco

Licence: MIT License
generate POCO classes from OData service

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to odata2poco

Servicestack.redis
.NET's leading C# Redis Client
Stars: ✭ 2,236 (+5223.81%)
Mutual labels:  mono, poco
Fastjson
Smallest, fastest polymorphic JSON serializer
Stars: ✭ 446 (+961.9%)
Mutual labels:  mono, netcore2
Jwtsecurity
JWT Server for Asp.Net Core and Asp.Net WebAPI2
Stars: ✭ 16 (-61.9%)
Mutual labels:  oauth2, netcore2
Servicestack.text
.NET's fastest JSON, JSV and CSV Text Serializers
Stars: ✭ 1,157 (+2654.76%)
Mutual labels:  mono, poco
PocoDynamo
C# .NET Typed POCO Client for AWS Dynamo DB
Stars: ✭ 39 (-7.14%)
Mutual labels:  mono, poco
lambda-facebook-oauth
An AWS Lambda function to facilitate Oauth2 social login with Facebook
Stars: ✭ 16 (-61.9%)
Mutual labels:  oauth2
inventory-demo
a simple MERN stack CRUD app example
Stars: ✭ 15 (-64.29%)
Mutual labels:  oauth2
OpenAM
OpenAM is an open access management solution that includes Authentication, SSO, Authorization, Federation, Entitlements and Web Services Security.
Stars: ✭ 476 (+1033.33%)
Mutual labels:  oauth2
php-crm-toolkit
Dynamics CRM Toolkit for PHP
Stars: ✭ 94 (+123.81%)
Mutual labels:  dynamics-365
osm-teams
Teams for OpenStreetMap! Check the beta 👉
Stars: ✭ 14 (-66.67%)
Mutual labels:  oauth2
Kvpbase
Scalable, simple RESTful object storage platform, written in C#
Stars: ✭ 43 (+2.38%)
Mutual labels:  metadata
angular2-social-login
Angular 2 OAuth social login facebook, google, LinkedIn etc using NodeJS server
Stars: ✭ 40 (-4.76%)
Mutual labels:  oauth2
SockNet
The easiest and fastest way to work with sockets in C#
Stars: ✭ 42 (+0%)
Mutual labels:  netcore2
GITGET
GitHub의 Contributions를 iOS의 Widget으로 보여주는 App
Stars: ✭ 101 (+140.48%)
Mutual labels:  oauth2
LawRun
Kernel source code (LawRun Kernel) for xiaomi sdm845 | Pocophone f1 (beryllium), Mi 8 (dipper), Mi Mix 2s (polaris) | You can fork and enjoy.
Stars: ✭ 22 (-47.62%)
Mutual labels:  poco
Flask-Discord
Discord OAuth2 extension for Flask. An Easier implementation of "Log In With Discord".
Stars: ✭ 123 (+192.86%)
Mutual labels:  oauth2
brauzie
Awesome CLI for fetching JWT tokens for OAuth2.0 clients
Stars: ✭ 14 (-66.67%)
Mutual labels:  oauth2
SampleOAuth2 UsingPythonClient
Django Sample app using Python OAuth client
Stars: ✭ 23 (-45.24%)
Mutual labels:  oauth2
columbus
Metadata storage service
Stars: ✭ 42 (+0%)
Mutual labels:  metadata
roda
RODA - Repository of Authentic Digital Objects
Stars: ✭ 54 (+28.57%)
Mutual labels:  metadata

Welcome to OData2Poco

OData2Poco is a code generation tool for generating plain-old CLR objects (POCO) from OData feeds. POCO classes can be used in a typed RESTful client OData services and code generation can be controlled by setting many options.

What is news

Odata2Poco v4.1.0 is published with a new feature: Name Mapping of Entities and properties using json file. Read wiki for more details and tutorial for how to use.

OData2Poco Packages

OData2Poco is available in three flavers:

  • A Console tool: OData2Poco.CommandLine (a.k.a o2pgen).
  • A .Net Core Global tool dotnet-o2pgen support NET5.
  • A class library: support NET5/netstandard2.0/net45/net461.

NuGet Version Chocolatey Global Tool NuGet Version

Continuous integration

Build server Platform Build status
AppVeyor Windows Build status
Travis Linux / OS X Build Status

Features of OData2Poco

  • Generate POCO classes corresponding to the Entities defined in the XML MetaData stored in OData Feeds.
  • Generation is based on the Metadata of the service stored on the server/ or EDMX xml files.
  • Support http(s) with/without authentication. The Supported autherizations are: basic, token and Oauth2.
  • Console CommandLine tool Support .NET 4.5 or higher.
  • Class library Support NET5/netstandard2.0/net461/net45.
  • Support Windows or Linux /OS fx (net core)
  • Packaged as a nuget package in three different packages:
  • A Class library full framework/ netstandard2.0 /NET5 for programming.
  • A console CommandLine tool (one executable file o2pgen.exe)
  • Global net core support NET5 (dotnet-o2pgen).
  • Console tool o2pgen is published as a Chocolatey package.
  • Generating CSharp POCO classes. Other languages may be added in the near future based on the community needs.
  • Convert Data type of EDMX to the corresponding CLR data types.
  • Support Entites, complex data type, Collections and navigation properties.
  • Support OData service version V1..V4
  • Code generation is controlled by setting different options:
    • Add the following attributes: - Add Key Attributes. - Add Required Attributes to the properties. - Add JsonProperty Attribute to the properties. - Add Table Attribute to the class. - Add DataMember Attribute to the properties and DataContract Attribute to the class. - Add display attribute to the properties. - Add ProtoMember to the properties and ProtoContract to the class to suport Proto Buffer. - Add user defined attribute for the properties.

    • Adding virtual modifier to the properties.

    • Convert name of properties to camelCase or PasCase

    • Add nullable datatypes, e.g. int?.

    • Generate (or not) navigation properties.

    • Generated class follows inheritance hierarchy of OData feed (unless switched-off).

    • Generated class can inherit from a common BaseClass/interface.

    • Define namespace to overwrite the namespace of the model.

    • Filter Entities.

    • Name Mapping of Entities and properties using json file with regex support.

  • Add primary key/mandatory comments to the properties of the class.
  • Rename class/properties that have a name match a c# reserved keyword.
  • Save metadata and generated code to a user defined file name.
  • Support colored console windows /linux /OS fx.
  • Support Microsoft.OData.Edm library version 7.5+ (OData v4).
  • Support Microsoft.Data.Edm library (OData v1-v3).

Features added in V3.2.0:

  • New: Support Windows NTLM authentication(Thanks to @lobster2012-user for help).
  • New: Support Microsoft Digest authentication.
  • New: Support Integrated Windows Authentication, enabling users to log in with their Windows credentials (Issue#19).
  • New: Add jsonProperty(originalName) to properties that are renamed because its name is the same as its enclosing type.
  • New: Show/hide model warning due to renaming properties/classes whose name is a reserved keyword.
  • New: Support abstract class.
  • New: support complex type inheritance
  • New: Add attribute [MaxLength] for max length of string/byte[] properties.
  • Convert EDM.TIME in Odata v3 to TimeSpan.
  • Support multi schema.
  • Support multi containers in OData v3.

Install

1) OData2Poco.dotnet.o2pgen:

NetCore Global tool NET5 named dotnet-o2pgen.

Can be installed from Nuget Gallery:

   dotnet tool install --global OData2Poco.dotnet.o2pgen  

2) OData2Poco.CommandLine:

Console application named o2pgen.

Can be installed from Nuget Gallery:

   Install-Package OData2Poco.CommandLine 

From Chocolatey Gallery:

 choco install odata2poco-commandline

3) OData2Poco Class library:

Support NET5/netstandard2.0/net461/net45. Can be installed from Nuget Gallery

     Install-Package OData2Poco

Try demo Application in NET5 Online

Release Notes

Changes

Try dotnet Global Tool:

Install from nuget gallary, run the command:

   dotnet o2pgen -r http://services.odata.org/V4/Northwind/Northwind.svc/
   For help type: dotnet o2pgen --help

Consol net45 tool:

   o2pgen -r http://services.odata.org/V4/Northwind/Northwind.svc/

Note: The same options are available for dotnet Global tool or Console tool

License

MIT License.

Documentation

Read the:Wiki

Acknowledgements:

Thank you JetBrains for Resharper open source license

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].