Skip to content

Features

moh-hassan edited this page Oct 4, 2022 · 3 revisions

Features of OData2Poco

  • 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.

Clone this wiki locally