-
Notifications
You must be signed in to change notification settings - Fork 21
CommandLine Reference
moh-hassan edited this page Aug 14, 2022
·
8 revisions
You can use the short name prefixed by one dash e.g -r or the long name prefixed by double dash e.g --url.
The only required option is -r.
The options are categorized into the following groups:
Option | Description |
---|---|
-r, --url | Required. URL of OData feed. |
-o, --auth | (Default: none) Authentication type. Allowed values: none, basic, token, auth2. |
-u, --user | User name in basic authentication /Or client_id in oauth2. |
-p,--password | password or/token Or access_token /Or client_secret in oauth2. |
--domain | Domain in Active Directory. |
-t, --token-endpoint | OAuth2 Token Endpoint. |
--token-params | OAuth2 Token Parameters with key=value separated by Ampersand '&' formated as: client_id=xxx&client_secret=xxx&..., no space is allowed. |
--proxy | Http Proxy in the form: 'server:port'. |
For more details about Authorization, see Authorization
Option | Description |
---|---|
-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, --navigation | Add 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. |
--entity-case | (Default: none) Type pas or camel to Convert Entity Name to PascalCase or CamelCase |
-a, --attribute | Attributes, Allowed values: key, req, json, tab, dm, proto, db, display, max, json3, see Examples |
-g, --gen-project | Generate a class library (.Net Standard) project csproj/vbproj. |
--include | Filter the Entities by FullName, case insensitive. Use space delimited list of entity names. Name may include the special characters * and ?. The char * represents a string of characters and ? match any single char. see examples |
Option | Description |
---|---|
--show-warning | Show warning messages of renaming properties/classes whose name is a reserved keyword. |
-v, --verbose | Prints C# code to the standard output. |
-h, --header | print http header of the service to the standard output. |
-l, --list | List POCO classes to standard output. |
-B, --enable-nullable-reference | Enable nullable for all reference types including option -b for primitive types by adding ? to types |
--help | Display this help screen. |
--version | Display version information. |
-
Filter by Entity Name: => --include product
-
Filter for more than one Entity, use delimited values separated by space ==> --include product customer employee
-
Filter using '*' placeholder for all characters ==> --include product* cust*
Generated classes may be: Products , Products_2019 ,Customers , CustomerOrders
- Filter by Namespace: => _--include myNamespace.*
Generated classes is all classes in myNamespace. Other namespaces will be excluded.
- Filter using ? placeholder for one char : => --include product?
Remark:
- Filter is case-insensitive ,e.g, product or PRODUCT or PRoducT is the same.
- Entity is the FullName: Namespace.Name, so every keyword is prefixed by * to include any namespace.
- 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: