-
Notifications
You must be signed in to change notification settings - Fork 20
generation
OData2Poco generate CSharp and VB.Net code from OData feeds. You can control the generated code as described in the next section.
Change Case of Poco Attributes:
Use the short option '-c' or the long option --case For camel case, enter:
-c camel
For Pas case, enter:
-c pas
Show/hide nullable symbol ?
-b
This result is showing '?' for properties which is null in the schema:
public int? Age {get;set;}
The default, hiding the nullable option.
This option has no effect for the properties which is not null in the schema.
Show/hide navigation properties
The default is hiding the navigation properties. Passing -n option, show the navigation properties.
-n
This result is showing the navigation properties which is defined in the schema:
This option has no effect for the properties which is not defined as a navigation in the schema.
Summary of the options used to control code generation:
-f, --filename (Default: poco.cs) filename to save generated c# code.
-x, --metafile Xml filename to save metadata.
-b, --nullable Add nullable data types
-n, --navigationAdd navigation properties
-e, --eager Add non virtual navigation Properties for Eager Loading
-i, --inherit for class inheritance from BaseClass and/or interfaces
-m, --namespace A namespace prefix for the OData namespace
-c, --case (Default: none) Type pas or camel to Convert Property Name to PascalCase or CamelCase
-a, --attribute Attributes, Allowed values: key, req, json,tab,dm,proto,db,display
--lang (Default: cs) Type cs for CSharp, vb for VB.NET
-g, --gen-project Generate a class library (.Net Stnadard) project csproj/vbproj.
- 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: