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/en/AspNet-Boilerplate-Migration-Guide.md
+8-12
Original file line number
Diff line number
Diff line change
@@ -216,9 +216,9 @@ However, it provides the following methods those can be used to query a single e
216
216
*`FindAsync(id)` returns the entity or null if not found.
217
217
*`GetAsync(id)` method returns the entity or throws an `EntityNotFoundException` (which causes HTTP 404 status code) if not found.
218
218
219
-
#### Sync vs Async
219
+
#### Sync vs Async
220
220
221
-
ABP Framework repository has no sync methods (like `Insert`). All the methods are async (like `InsertAsync`). So, if your application has sync repository method usages, convert them to async versions.
221
+
ABP Framework repository has no sync methods (like `Insert`). All the methods are async (like `InsertAsync`). So, if your application has sync repository method usages, convert them to async versions.
222
222
223
223
In general, ABP Framework forces you to completely use async everywhere, because mixing async & sync methods is not a recommended approach.
if (awaitcontext.IsGrantedAsync(TenantManagementPermissions.Tenants.Default))
711
707
{
712
708
tenantManagementMenuItem.AddItem(
713
709
newApplicationMenuItem(
714
710
TenantManagementMenuNames.Tenants,
715
-
l["Tenants"],
711
+
l["Tenants"],
716
712
url: "/TenantManagement/Tenants"));
717
713
}
718
714
}
@@ -731,4 +727,4 @@ The following features are not present for the ABP Framework. Here, a list of so
731
727
*[Real time notification system](https://aspnetboilerplate.com/Pages/Documents/Notification-System) ([#633](https://github.com/abpframework/abp/issues/633))
732
728
*[NHibernate Integration](https://aspnetboilerplate.com/Pages/Documents/NHibernate-Integration) ([#339](https://github.com/abpframework/abp/issues/339)) - We don't intent to work on this, but any community contribution welcome.
733
729
734
-
Some of these features will eventually be implemented. However, you can implement them yourself if they are important for you. If you want, you can [contribute](Contribution/Index.md) to the framework, it is appreciated.
730
+
Some of these features will eventually be implemented. However, you can implement them yourself if they are important for you. If you want, you can [contribute](Contribution/Index.md) to the framework, it is appreciated.
Copy file name to clipboardexpand all lines: docs/en/Customizing-Application-Modules-Overriding-Services.md
+1
Original file line number
Diff line number
Diff line change
@@ -59,6 +59,7 @@ In most cases, you will want to change one or a few methods of the current imple
59
59
### Example: Overriding an Application Service
60
60
61
61
````csharp
62
+
//[RemoteService(IsEnabled = false)] // If you use dynamic controller feature you can disable remote service. Prevent creating duplicate controller for the application service.
Copy file name to clipboardexpand all lines: docs/en/Multi-Tenancy.md
+6-6
Original file line number
Diff line number
Diff line change
@@ -303,10 +303,10 @@ TODO:...
303
303
Volo.Abp.AspNetCore.MultiTenancy package adds following tenant resolvers to determine current tenant from current web request (ordered by priority). These resolvers are added and work out of the box:
304
304
305
305
***CurrentUserTenantResolveContributor**: Gets the tenant id from claims of the current user, if the current user has logged in. **This should always be the first contributor for security**.
306
-
***QueryStringTenantResolver**: Tries to find current tenant id from query string parameter. Parameter name is "__tenant" by default.
307
-
***RouteTenantResolver**: Tries to find current tenant id from route (URL path). Variable name is "__tenant" by default. So, if you defined a route with this variable, then it can determine the current tenant from the route.
308
-
***HeaderTenantResolver**: Tries to find current tenant id from HTTP header. Header name is "__tenant" by default.
309
-
***CookieTenantResolver**: Tries to find current tenant id from cookie values. Cookie name is "__tenant" by default.
306
+
***QueryStringTenantResolveContributor**: Tries to find current tenant id from query string parameter. Parameter name is "__tenant" by default.
307
+
***RouteTenantResolveContributor**: Tries to find current tenant id from route (URL path). Variable name is "__tenant" by default. So, if you defined a route with this variable, then it can determine the current tenant from the route.
308
+
***HeaderTenantResolveContributor**: Tries to find current tenant id from HTTP header. Header name is "__tenant" by default.
309
+
***CookieTenantResolveContributor**: Tries to find current tenant id from cookie values. Cookie name is "__tenant" by default.
310
310
311
311
> If you use nginx as a reverse proxy server, please note that if `TenantKey` contains an underscore or other special characters, there may be a problem, please refer to:
Copy file name to clipboardexpand all lines: docs/en/Object-To-Object-Mapping.md
+55
Original file line number
Diff line number
Diff line change
@@ -162,6 +162,61 @@ public class MyProfile : Profile
162
162
163
163
It is suggested to use the `MapExtraProperties()` method if both classes are extensible objects (implement the `IHasExtraProperties` interface). See the [object extension document](Object-Extensions.md) for more.
164
164
165
+
### Other Useful Extension Methods
166
+
167
+
There are some more extension methods those can simplify your mapping code.
168
+
169
+
#### Ignoring Audit Properties
170
+
171
+
It is common to ignore audit properties when you map an object to another.
172
+
173
+
Assume that you need to map a `ProductDto` ([DTO](Data-Transfer-Objects.md)) to a `Product`[entity](Entities.md) and the entity is inheriting from the `AuditedEntity` class (which provides properties like `CreationTime`, `CreatorId`, `IHasModificationTime`... etc).
174
+
175
+
You probably want to ignore these base properties while mapping from the DTO. You can use `IgnoreAuditedObjectProperties()` method to ignore all audit properties (instead of manually ignoring them one by one):
176
+
177
+
````csharp
178
+
publicclassMyProfile : Profile
179
+
{
180
+
publicMyProfile()
181
+
{
182
+
CreateMap<ProductDto, Product>()
183
+
.IgnoreAuditedObjectProperties();
184
+
}
185
+
}
186
+
````
187
+
188
+
There are more extension methods like `IgnoreFullAuditedObjectProperties()` and `IgnoreCreationAuditedObjectProperties()` those can be used based on your entity type.
189
+
190
+
> See the "*Base Classes & Interfaces for Audit Properties*" section in the [entities document](Entities.md) to know more about auditing properties.
191
+
192
+
#### Ignoring Other Properties
193
+
194
+
In AutoMapper, you typically write such a mapping code to ignore a property:
195
+
196
+
````csharp
197
+
publicclassMyProfile : Profile
198
+
{
199
+
publicMyProfile()
200
+
{
201
+
CreateMap<SimpleClass1, SimpleClass2>()
202
+
.ForMember(x=>x.CreationTime, map=>map.Ignore());
203
+
}
204
+
}
205
+
````
206
+
207
+
We found it unnecessarily long and created the `Ignore()` extension method:
0 commit comments