-
Notifications
You must be signed in to change notification settings - Fork 21
Features
-
Generate POCO classes corresponding to the Entities defined in the XML MetaData stored in OData Feeds.
-
Generate c# classes (with init-only support of c# 8) or records.
-
Generate typescript interfaces or classes. Separate file or multi-files (modules).
-
Generation is based on the Metadata of the service stored on the server/ or EDMX xml files.
-
Support http(s) with/without basic authentication : user and password.
-
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:
- Support Nullable reference type of c# 8.
- Add Key, Required Attributes to the properties.
- Add JsonProperty Attribute to the properties.
- Add Table Attribute to the class.
- 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 can inherit from a common BaseClass/interface.
- Define namespace to overwrite the namespace of the model.
- Add primary key/mandatory comments to the properties of the class. .
-
Save metadata and generated code to a user defined file name.
-
Support .NET 4.5 or higher. starting V5, .net472.
-
Support .NET core 6
-
Support Windows or Linux (Mono)
-
Packaged as a Class library and CommandLine tool (one executable file o2pgen.exe) and can be installed from nuget gallery or Chocolatey gallery.
-
Generating CSharp POCO classes. Other languages may be supported in the near future based on the community needs. MIT License.
-
Odata feeds can be http(s) or Meta xml files or remote xml files.
- home
- Announcing V6.0.0
- Features
- Getting started with c# generation
- Http Connection
- Using Parameter file
- User Defined Attributes
- Controlling c# code generation
- Model Filter
- Enable Nullable Reference type of c# 8
- Class with Init-Only Properties (c# 9)
- Generating Constructor
- Record-Type (c# 9)
- Name Map
- Securing Password
- Using Proxy Server
- Using Plugin Attributes
- Developing with OData2Poco
- Examples in dotnetfiddle.net
- CommandLine-Reference
- AttributeExamples
- typescript generation
- Help Screen
- How to
- New Feature 4.2.1
Samples of generated code: