You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/pages/example/api-controller.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
# Using Gridify in API Controllers
2
2
3
-
When working with ASP.NET APIs, especially when you need to apply string-based filtering conditions, sorting based on field names, or implementing pagination functionality, the Gridify library is a valuable tool. It can be used in any .NET project and with any type of collection, not just limited to ASP.NET projects.
3
+
When working with ASP.NET APIs, especially when you need to apply string-based filtering, sorting by field names, or implementing pagination, the Gridify library is a valuable tool. It can be used in any .NET project and with any type of collection, not just limited to ASP.NET projects.
4
4
5
-
To demonstrate the core concepts of Gridify, let's look at a simple implementation in the following example.
5
+
Let's look at a simple implementation to demonstrate the core concepts of Gridify.
Filtering, Ordering, Paging, and Projection are all done with `GridifyTo`.
19
+
Filtering, ordering, paging, and projection are all done with a `GridifyTo` extension method.
20
20
21
-
Gridify library does not have a built-in `GridifyTo` extension method because we don't want to have AutoMapper dependency. but if you are using AutoMapper in your project, I recommend you to add the bellow extension method to your project.
21
+
The Gridify library does not include a built-in `GridifyTo` extension method because we don't want to add an AutoMapper dependency. However, if you are using AutoMapper in your project, we recommend adding the following extension method:
Copy file name to clipboardExpand all lines: docs/pages/guide/dependency-injection.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
# Dependency Injection
2
2
3
-
Gridify offers a powerful feature that enables you to streamline data mapping and configurations in your application by integrating with the Dependency Injection (DI) container. By registering your mapping profiles with DI, you can achieve cleaner, more maintainable code and improved separation of concerns. This section provides an overview of how to register your GridifyMapper configurations with DI.
3
+
Gridify offers a powerful feature that enables you to streamline data mapping and configuration in your application by integrating with the Dependency Injection (DI) container. By registering your mapping profiles with DI, you can achieve cleaner, more maintainable code and improved separation of concerns. This section provides an overview of how to register your GridifyMapper configurations in the DI container.
4
4
5
5
## Register GridifyMapper with DI
6
6
7
-
Registering Gridify mapping with DI is a straightforward process. You'll define mapping profiles for your models and then register them in the DI container. Follow these steps to get started:
7
+
Registering Gridify mappings with DI is straightforward. Define mapping profiles for your models, then register them in the DI container. Follow these steps to get started:
this is completely equivalent to the below LINQ query:
20
+
This is equivalent to the following LINQ query:
21
21
22
22
```csharp
23
23
varquery=personsRepo.Where(p=>p.Name=="John");
24
24
```
25
25
26
-
In the `ApplyFiltering` method, we can use a raw string to filter the data, which can be generated dynamically or passed by the end-user for example through an API client or console input, but using the Linq`Where` method, we always have to hardcode the query for the supported fields.
26
+
With the `ApplyFiltering` method, you can use a raw string to filter data. This string can be generated dynamically or passed by the end-user (for example, through an API client or console input). In contrast, when using the LINQ`Where` method, you must hard-code the query for the supported fields.
27
27
28
28
Check out the [Filtering Operators](./filtering.md) section for more information.
29
29
30
30
## ApplyOrdering
31
31
32
-
You can use this method if you want to only apply **ordering**on an `IQueriable` collection or `DbSet`.
32
+
Use this method to apply **ordering**to an `IQueryable` collection or `DbSet`.
33
33
34
34
```csharp
35
35
varquery=personsRepo.ApplyOrdering("name, age desc");
36
36
```
37
37
38
-
this is completely equivalent to the below LINQ query:
@@ -45,35 +45,35 @@ Check out the [Ordering](./ordering.md) section for more information.
45
45
46
46
## ApplyPaging
47
47
48
-
You can use this method if you want to only apply **paging**on an `IQueryable` collection or `DbSet`.
48
+
Use this method to apply **paging**to an `IQueryable` collection or `DbSet`.
49
49
50
50
```csharp
51
51
varquery=personsRepo.ApplyPaging(3, 20);
52
52
```
53
53
54
-
this is completely equivalent to the below LINQ query:
54
+
This is equivalent to the following LINQ query:
55
55
56
56
```csharp
57
57
varquery=personsRepo.Skip((3-1) *20).Take(20);
58
58
```
59
59
60
60
## ApplyFilteringAndOrdering
61
61
62
-
You can use this method if you want to apply **filtering** and **ordering**on an `IQueryable` collection or `DbSet`. This method accepts `IGridifyQuery`.
62
+
Use this method to apply **filtering** and **ordering**to an `IQueryable` collection or `DbSet`. This method accepts `IGridifyQuery`.
63
63
64
64
## ApplyOrderingAndPaging
65
65
66
-
You can use this method if you want to apply **ordering** and **paging**on an `IQueryable` collection or `DbSet`. This method accepts `IGridifyQuery`.
66
+
Use this method to apply **ordering** and **paging**to an `IQueryable` collection or `DbSet`. This method accepts `IGridifyQuery`.
67
67
68
68
## ApplyFilteringOrderingPaging
69
69
70
-
You can use this method if you want to apply **filtering** and **ordering** and **paging**on an `IQueryable` collection or `DbSet`. This method accepts `IGridifyQuery`.
70
+
Use this method to apply **filtering**, **ordering**, and **paging**to an `IQueryable` collection or `DbSet`. This method accepts `IGridifyQuery`.
71
71
72
72
## GridifyQueryable
73
73
74
-
Like [ApplyFilteringOrderingPaging](#ApplyFilteringOrderingPaging) but it returns a `QueryablePaging<T>` that has an extra `int Count` value that can be used for pagination.
74
+
Like [ApplyFilteringOrderingPaging](#applyfilteringorderingpaging), but it returns a `QueryablePaging<T>` that includes an extra `int Count` value for pagination.
75
75
76
76
## Gridify
77
77
78
-
This is an ALL-IN-ONE package, it accepts `IGridifyQuery`, applies filtering, ordering, and paging, and returns a `Paging<T>` object.
79
-
This method is completely optimized to be used with any **Grid** component.
78
+
This is an all-in-one method. It accepts `IGridifyQuery`, applies filtering, ordering, and paging, and returns a `Paging<T>` object.
79
+
This method is optimized for use with any grid component.
Copy file name to clipboardExpand all lines: docs/pages/guide/extensions/elasticsearch.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
# Elasticsearch
2
2
3
-
Gridify.Elasticsearch is an extension of Gridify, that provides an ability to generate Elasticsearch DSL queries.
3
+
Gridify.Elasticsearch is an extension of Gridify that provides the ability to generate Elasticsearch DSL queries.
4
4
5
5
## Gridify.Elasticsearch Package
6
6
7
-
The `Gridify.Elasticsearch` package has a bunch of extension methods that allow to convert Gridify filters and sortings to Elasticsearch DSL queries using Elastic.Clients.Elasticsearch .NET client.
7
+
The `Gridify.Elasticsearch` package includes extension methods that convert Gridify filters and sortings to Elasticsearch DSL queries using the Elastic.Clients.Elasticsearch .NET client.
Copy file name to clipboardExpand all lines: docs/pages/guide/extensions/gridify-client.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,6 @@
1
1
# Gridify Client Library
2
2
3
-
The Gridify Client library is a lightweight JavaScript and TypeScript library designed to simplify the creation of
4
-
dynamic queries on the client side. This library facilitates the construction of queries that can be seamlessly
5
-
integrated with your server-side APIs, leveraging the powerful features of Gridify.
3
+
The Gridify Client library is a lightweight JavaScript and TypeScript library designed to simplify creating dynamic queries on the client side. This library facilitates building queries that can be seamlessly integrated with your server-side APIs, leveraging the powerful features of Gridify.
Copy file name to clipboardExpand all lines: docs/pages/guide/filtering.md
+4-9Lines changed: 4 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,9 +63,7 @@ this query matches with JOHN - john - John - jOHn ...
63
63
64
64
## Escaping
65
65
66
-
Gridify have five special operators `, | ( ) /i` to handle complex queries and case-insensitive searches. If you want
67
-
to use these characters in your query values (after conditional operator), you should add a backslash <code>\ </code>
68
-
before them. having this regex could be helpful `([(),|]|\/i)`.
66
+
Gridify has five special operators: `, | ( ) /i` that are used to handle complex queries and case-insensitive searches. If you want to use these characters as literal values in your queries (after the conditional operator), you need to escape them by adding a backslash `\` before each one. This regex pattern can help identify characters that need escaping: `([(),|]|\/i)`.
69
67
70
68
JavaScript escape example:
71
69
@@ -113,15 +111,12 @@ Check out [Defining Mappings for Indexable Properties](./gridifyMapper.md#defini
113
111
114
112
## Custom Operators
115
113
116
-
Sometimes the default Gridify operators are not enough, For example, if you need an operator for regex matching or when
117
-
you are using the EntityFramework, you may want to use `EF.Functions.FreeText` rather than a LIKE with wildcards. In
118
-
this case, you can define your own operators. (added in `v2.6.0`)
114
+
Sometimes the default Gridify operators are not enough. For example, if you need an operator for regex matching, or when using Entity Framework and you want to use `EF.Functions.FreeText` instead of a LIKE with wildcards. In these cases, you can define your own custom operators (added in `v2.6.0`).
119
115
120
-
To define a custom operator, you need to create a class that implements the `IGridifyOperator` interface. then you need
121
-
to register it through the global [CustomOperators](./gridifyGlobalConfiguration.md#customoperators) configuration.
116
+
To define a custom operator, create a class that implements the `IGridifyOperator` interface, then register it through the global [CustomOperators](./gridifyGlobalConfiguration.md#customoperators) configuration.
122
117
123
118
::: tip
124
-
Custom operators must be start with the `#` character.
119
+
Custom operators must start with the `#` character.
If you are using the Entity Framework in your project, you should install the `Gridify.EntityFramework` package instead of `Gridify`.
11
+
If you are using Entity Framework in your project, install the `Gridify.EntityFramework` package instead of `Gridify`.
11
12
12
-
This package provides the same functionality as the `Gridify` package but is designed to be more compatible with [Entity Framework](./extensions/entityframework).
13
+
This package provides the same functionality as the `Gridify` package but is optimized for [Entity Framework](./extensions/entityframework) compatibility.
0 commit comments