Skip to content

Commit

Permalink
Merge pull request #32 from ZEXSM/add-docs-replacecharacters
Browse files Browse the repository at this point in the history
#ZEXSM#add info by ReplaceCharacters to readme
  • Loading branch information
ZEXSM authored Aug 29, 2020
2 parents 499108f + 1267afb commit 1eabf4c
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ var uri = new ODataQueryBuilder<ODataInfoContainer>("http://mock/odata")
```
> $filter=concat(ODataKind/ODataCode/Code, '_1') eq 'test_code_1'

## Usage convert functions
## Usage other functions

#### ConvertEnumToString
```csharp
Expand All @@ -286,6 +286,16 @@ var uri = new ODataQueryBuilder<ODataInfoContainer>("http://mock/odata")
```
> $filter=ODataKind/OpenDate eq 2019-02-09

#### ReplaceCharacters
```csharp
var constValue = "3 & 4";
...
.Filter((s, f) => s.ODataKind.ODataCode.Code == f.ReplaceCharacters(
constValue,
new Dictionary<string, string> { { "&", "%26" } }))
```
> $filter=ODataKind/ODataCode/Code eq '3 %26 4'

## Suppress exceptions

:warning: __May result in loss of control over the expected result.__
Expand All @@ -309,5 +319,4 @@ var uri = builder
&& o.In(s.IdType, new[] { 123, 512 }))
.ToUri()
```
> http://mock/odata/ODataType?$filter=IdType in (123,512)
```
> http://mock/odata/ODataType?$filter=IdType in (123,512)

0 comments on commit 1eabf4c

Please sign in to comment.