diff --git a/docs/AspNetCore/Client-Side-Package-Management.md b/docs/AspNetCore/Client-Side-Package-Management.md index 56760caf9b..3c1785daa5 100644 --- a/docs/AspNetCore/Client-Side-Package-Management.md +++ b/docs/AspNetCore/Client-Side-Package-Management.md @@ -22,14 +22,14 @@ The benefit of a **standard package** is: Depending on a standard package is easy. Just add it to your **package.json** file like you normally do. Example: -````json -{ - ... - "dependencies": { - "@abp/bootstrap": "^1.0.0" - } -} -```` + + { + ... + "dependencies": { + "@abp/bootstrap": "^1.0.0" + } + } + It's suggested to depend on a standard package instead of directly depending on a third-party package. diff --git a/docs/Entities.md b/docs/Entities.md index d6c9301e5a..89688d58c8 100644 --- a/docs/Entities.md +++ b/docs/Entities.md @@ -173,4 +173,4 @@ ABP does not force you to apply any DDD rule or patterns. However, it tries to m #### Aggregate Roots with Composite Keys -While it's not common (and not suggested) for aggregate roots, it isin fact possible to define composite keys in the same way as defined for the mentioned entities above. Use non-generic `AggregateRoot` base class in that case. +While it's not common (and not suggested) for aggregate roots, it is in fact possible to define composite keys in the same way as defined for the mentioned entities above. Use non-generic `AggregateRoot` base class in that case. diff --git a/docs/Exception-Handling.md b/docs/Exception-Handling.md index 0742da863e..896f26d723 100644 --- a/docs/Exception-Handling.md +++ b/docs/Exception-Handling.md @@ -1,15 +1,15 @@ ## Exception Handling -ABP provides a built-in infrastructure and offers a standard model to exception handling for a web application. +ABP provides a built-in infrastructure and offers a standard model for handling exceptions in a web application. * Automatically **handles all exceptions** and sends a standard **formatted error message** to the client for an API/AJAX request. * Automatically hides **internal infrastructure errors** and returns a standard error message. -* Provides configuration option to **localize** exception messages. -* Automatically maps standard exceptions to **HTTP status codes** and provides configuration option to map custom exceptions. +* Provides a configurable way to **localize** exception messages. +* Automatically maps standard exceptions to **HTTP status codes** and provides a configurable option to map these to custom exceptions. ### Automatic Exception Handling -`AbpExceptionFilter` handles an exception if **any of the following conditions** meets; +`AbpExceptionFilter` handles an exception if **any of the following conditions** are meet: * Exception is thrown by a **controller action** which returns an **object result** (not a view result). * The request is an AJAX request (`X-Requested-With` HTTP header value is `XMLHttpRequest`). @@ -29,7 +29,7 @@ Error Message is an instance of the `RemoteServiceErrorResponse` class. The simp } ```` -There are **optional fields** those can be filled based on the occurred exception. +There are **optional fields** those can be filled based upon the exception that has occured. ##### Error Code @@ -81,7 +81,7 @@ Error **details** in an optional field of the JSON error message. Thrown `Except } ```` -`AbpValidationException` implements the `IHasValidationErrors` interface and it is automatically thrown by the framework when a request input is not valid. So, usually you don't deal with validation errors except you have a very custom validation logic. +`AbpValidationException` implements the `IHasValidationErrors` interface and it is automatically thrown by the framework when a request input is not valid. So, usually you don't need to deal with validation errors unless you have higly customised validation logic. #### Logging @@ -89,7 +89,7 @@ Caught exceptions are automatically logged. ##### Log Level -Exceptions are logged with the `Error` level by default. Log level can be determined by the exception if it implements the `IHasLogLevel` interface. Example: +Exceptions are logged with the `Error` level by default. The Log level can be determined by the exception if it implements the `IHasLogLevel` interface. Example: ````C# public class MyException : Exception, IHasLogLevel @@ -120,15 +120,15 @@ public class MyException : Exception, IExceptionWithSelfLogging Most of your own exceptions will be business exceptions. The `IBusinessException` interface is used to mark an exception as a business exception. -`BusinessException` implements the `IBusinessException` interface in addition to the `IHasErrorCode`, `IHasErrorDetails` and `IHasLogLevel` interfaces. Default log level is `Warning`. +`BusinessException` implements the `IBusinessException` interface in addition to the `IHasErrorCode`, `IHasErrorDetails` and `IHasLogLevel` interfaces. The default log level is `Warning`. -Usually you have an error code related to a particular business exception. Example: +Usually you have an error code related to a particular business exception. For example: ````C# throw new BusinessException(QaErrorCodes.CanNotVoteYourOwnAnswer); ```` -`QaErrorCodes.CanNotVoteYourOwnAnswer` is just a `const string`. Such an error code format is suggested: +`QaErrorCodes.CanNotVoteYourOwnAnswer` is just a `const string`. The following error code format is recommended: ```` : @@ -147,11 +147,11 @@ Volo.Qa:010002 ### Exception Localization -One problem with throwing exception is how to localize error messages while sending to clients. ABP offers two models and their variants. +One problem with throwing exceptions is how to localize error messages while sending it to the client. ABP offers two models and their variants. #### User Friendly Exception -If an exception implements the `IUserFriendlyException` interface, then ABP does not change it's `Message` and `Details` properties and directly send to the client. +If an exception implements the `IUserFriendlyException` interface, then ABP does not change it's `Message` and `Details` properties and directly send it to the client. `UserFriendlyException` class is the built-in implementation of the `IUserFriendlyException` interface. Example usage: @@ -161,7 +161,7 @@ throw new UserFriendlyException( ); ```` -In this way, **no need to localization** at all. If you want to localize the message, you can inject and use the standard **string localizer** (see the [localization document](Localization.md)). Example: +In this way, there is **no need for localization** at all. If you want to localize the message, you can inject and use the standard **string localizer** (see the [localization document](Localization.md)). Example: ````C# throw new UserFriendlyException(_stringLocalizer["UserNameShouldBeUniqueMessage"]); @@ -178,7 +178,7 @@ Then define it in the **localization resource** for each language. Example: } ```` -String localizer already supports **parameterized messages**. Example: +String localizer already supports **parameterized messages**. For example: ````C# throw new UserFriendlyException(_stringLocalizer["UserNameShouldBeUniqueMessage", "john"]); @@ -194,10 +194,10 @@ Then the localization text can be: #### Using Error Codes -`UserFriendlyException` is fine, but has a few problems in advanced usages: +`UserFriendlyException` is fine, but it has a few problems in advanced usages: -* It requires to **inject string localizer** everywhere and always use it while throwing exceptions. -* Some of the cases, it may **not possible** to inject the string localizer (in a static context or in an entity method). +* It requires you to **inject the string localizer** everywhere and always use it while throwing exceptions. +* However, in some of the cases, it may **not be possible** to inject the string localizer (in a static context or in an entity method). Instead of localizing the message while throwing the exception, you can separate the process using **error codes**. @@ -210,7 +210,7 @@ services.Configure(options => }); ```` -Then any of the exceptions with `Volo.Qa` namespace will be localized using the given localization resource. The localization resource should have an entry with the error code key. Example: +Then any of the exceptions with `Volo.Qa` namespace will be localized using their given localization resource. The localization resource should always have an entry with the error code key. Example: ````json { @@ -228,11 +228,11 @@ throw new BusinessException(QaDomainErrorCodes.CanNotVoteYourOwnAnswer); ```` * Throwing any exception implementing the `IHasErrorCode` interface behaves the same. So, the error code localization approach is not unique to the `BusinessException` class. -* Defining localized string is not required for an error message. If not defined, ABP sends the default error message to the client. It does not use the `Message` property of the exception! if you want that, use the `UserFriendlyException` (or use an exception type that implements the `IUserFriendlyException` interface). +* Defining localized string is not required for an error message. If it's not defined, ABP sends the default error message to the client. It does not use the `Message` property of the exception! if you want that, use the `UserFriendlyException` (or use an exception type that implements the `IUserFriendlyException` interface). ##### Using Message Parameters -If you have a parameterized error message, then you can set it with the exception's `Data` property. Example: +If you have a parameterized error message, then you can set it with the exception's `Data` property. For example: ````C# throw new BusinessException("App:010046") @@ -245,14 +245,14 @@ throw new BusinessException("App:010046") ```` -Fortunately there is a shortcut for it: +Fortunately there is a shortcut way to code this: ````C# throw new BusinessException("App:010046") .WithData("UserName", "john"); ```` -Then the localized text can contain the`UserName` parameter: +Then the localized text can contain the `UserName` parameter: ````json { @@ -263,7 +263,7 @@ Then the localized text can contain the`UserName` parameter: } ```` -* `WithData` can be chained for more than one parameter (like `.WithData(...).WithData(...)`). +* `WithData` can be chained with more than one parameter (like `.WithData(...).WithData(...)`). ### HTTP Status Code Mapping @@ -278,11 +278,11 @@ ABP tries to automatically determine the most suitable HTTP status code for comm * Returns `501` (not implemented) for the `NotImplementedException`. * Returns `500` (internal server error) for other exceptions (those are assumed as infrastructure exceptions). -The `IHttpExceptionStatusCodeFinder` is used to automatically determine the HTTP status code. Default implementation is the `DefaultHttpExceptionStatusCodeFinder` class. It can be replaced or extended if needed. +The `IHttpExceptionStatusCodeFinder` is used to automatically determine the HTTP status code. The default implementation is the `DefaultHttpExceptionStatusCodeFinder` class. It can be replaced or extended as needed. #### Custom Mappings -Automatic HTTP status code determination can be overrided by custom mappings. Example: +Automatic HTTP status code determination can be overrided by custom mappings. For example: ````C# services.Configure(options => @@ -293,10 +293,10 @@ services.Configure(options => ### Built-In Exceptions -Some exception types are automatically thrown by the framework. +Some exception types are automatically thrown by the framework: - `AbpAuthorizationException` is thrown if the current user has no permission to perform the requested operation. See authorization document (TODO: link) for more. - `AbpValidationException` is thrown if the input of the current request is not valid. See validation document (TODO: link) for more. - `EntityNotFoundException` is thrown if the requested entity is not available. This is mostly thrown by [repositories](Repositories.md). -You can also throw these type of exceptions in your code (while it's rarely needed). \ No newline at end of file +You can also throw these type of exceptions in your code (although it's rarely needed). diff --git a/docs/Module-Development-Basics.md b/docs/Module-Development-Basics.md index 43435ef080..c2b106ed42 100644 --- a/docs/Module-Development-Basics.md +++ b/docs/Module-Development-Basics.md @@ -2,11 +2,11 @@ ### Introduction -ABP itself is a modular framework. It also provides infrastructure and architectural model to develop your own modules. +ABP is itself a modular framework. It also provides an infrastructure and architectural model to develop your own modules. ### Module Class -Every module should define a module class. Most simple way of defining a module class is to create a class derived from ``AbpModule`` as like below: +Every module should define a module class. The simplest way of defining a module class is to create a class derived from ``AbpModule`` as shown below: ````C# public class BlogModule : AbpModule @@ -20,7 +20,7 @@ public class BlogModule : AbpModule ##### ConfigureServices Method -``ConfigureServices`` is the main method to add your services to dependency injection system and configure other modules. Example: +``ConfigureServices`` is the main method to add your services to the dependency injection system and configure other modules. Example: ````C# public class BlogModule : AbpModule @@ -32,9 +32,9 @@ public class BlogModule : AbpModule } ```` -You can register dependencies one by one as stated in Microsoft's documentation. Bu ABP has a **conventional dependency registration system** which automatically register all services in your assembly. See the [dependency Injection](Dependency-Injection.md) documentation for more about the dependency injection system. +You can register dependencies one by one as stated in Microsoft's documentation. But ABP has a **conventional dependency registration system** which automatically register all services in your assembly. See the [dependency Injection](Dependency-Injection.md) documentation for more about the dependency injection system. -You can also configure other services and modules in this method. Example: +You can also configure other services and modules in this way. Example: ````C# public class BlogModule : AbpModule @@ -54,11 +54,11 @@ See Configuration (TODO: link) document for more about the configuration system. ##### Pre & Post Configure Services -``AbpModule`` class also defines ``PreConfigureServices`` and ``PostConfigureServices`` methods to override and write your code just before and just after ``ConfigureServices``. Notice that the code you have written into these methods will be executed before/after ``ConfigureServices`` methods of all other modules. +``AbpModule`` class also defines ``PreConfigureServices`` and ``PostConfigureServices`` methods to override and write your code just before and just after ``ConfigureServices``. Notice that the code you have written into these methods will be executed before/after the ``ConfigureServices`` methods of all other modules. #### Application Initialization -Once all services of all modules are configured, application starts by initializing all modules. In this phase, you can resolve services from ``IServiceProvider`` since it's ready and available. +Once all the services of all modules are configured, the application starts by initializing all modules. In this phase, you can resolve services from ``IServiceProvider`` since it's ready and available. ##### OnApplicationInitialization Method @@ -77,7 +77,7 @@ public class BlogModule : AbpModule } ```` -``OnApplicationInitialization`` is generally used by the startup module to construct middleware pipeline for ASP.NET Core applications. Example: +``OnApplicationInitialization`` is generally used by the startup module to construct the middleware pipeline for ASP.NET Core applications. Example: ````C# [DependsOn(typeof(AbpAspNetCoreMvcModule))] @@ -100,19 +100,19 @@ public class AppModule : AbpModule } ```` -You can also perform startup logic if your module requires +You can also perform startup logic if your module requires it ##### Pre & Post Application Initialization -``AbpModule`` class also defines ``OnPreApplicationInitialization`` and ``OnPostApplicationInitialization`` methods to override and write your code just before and just after ``OnApplicationInitialization``. Notice that the code you have written into these methods will be executed before/after ``OnApplicationInitialization`` methods of all other modules. +``AbpModule`` class also defines ``OnPreApplicationInitialization`` and ``OnPostApplicationInitialization`` methods to override and write your code just before and just after ``OnApplicationInitialization``. Notice that the code you have written into these methods will be executed before/after the ``OnApplicationInitialization`` methods of all other modules. #### Application Shutdown -Lastly, you can override ``OnApplicationShutdown`` method if you want to execute a code while application is beign shutdown. +Lastly, you can override ``OnApplicationShutdown`` method if you want to execute some code while application is beign shutdown. ### Module Dependencies -In a modular application, it's typical a module depends on other modules. An Abp module must declare ``[DependsOn]`` attribute if it depends on another module, as shown below: +In a modular application, it's not unusual for one module to depend upon another module(s). An Abp module must declare ``[DependsOn]`` attribute if it does have a dependcy upon another module, as shown below: ````C# [DependsOn(typeof(AbpAspNetCoreMvcModule))] @@ -125,4 +125,4 @@ public class BlogModule You can use multiple ``DependsOn`` attribute or pass multiple module types to a single ``DependsOn`` attribute depending on your preference. -A depended module may depend on another module, but you only need to define your direct dependencies. ABP investigates dependency graph on application startup and initializes/shutdowns modules in the correct order. \ No newline at end of file +A depended module may depend on another module, but you only need to define your direct dependencies. ABP investigates the dependency graph for the application at startup and initializes/shutdowns modules in the correct order. diff --git a/docs/Tutorials/AspNetCore-Mvc/Part-I.md b/docs/Tutorials/AspNetCore-Mvc/Part-I.md index faf8b14b8c..649ac03de6 100644 --- a/docs/Tutorials/AspNetCore-Mvc/Part-I.md +++ b/docs/Tutorials/AspNetCore-Mvc/Part-I.md @@ -308,7 +308,7 @@ Open the `Index.cshtml` and change the content as shown below:

Books

```` -* This page **inherits** from the `BookStorePageBase` class which comes with the startup template and provides some shared properties/methods used by all pages. +* Change the default inhertitance of the Razor View Page Model so it **inherits** from the `BookStorePageBase` class (instead of `PageModel`). The `BookStorePageBase` class which comes with the startup template and provides some shared properties/methods used by all pages. #### Add Books Page to the Main Menu diff --git a/docs/Virtual-File-System.md b/docs/Virtual-File-System.md index f33fda7464..f9e620325d 100644 --- a/docs/Virtual-File-System.md +++ b/docs/Virtual-File-System.md @@ -1,6 +1,6 @@ ## Virtual File System -Virtual File System makes possible to manage files those are not physically exists in the file system (disk). It's mainly used to embed (js, css, image, cshtml...) files into assemblies and use them like physical files on runtime. +The Virtual File System makes it possible to manage files that do not physically exist on the file system (disk). It's mainly used to embed (js, css, image, cshtml...) files into assemblies and use them like physical files on runtime. ### Volo.Abp.VirtualFileSystem Package @@ -44,7 +44,7 @@ If you want to add multiple files, this can be tedious. Alternatively, you can d This configuration recursively adds all files under the **MyResources** folder of the project (including the files you will add in the future). -Then the module should configure `VirtualFileSystemOptions` to register embedded files to the virtual file system. Example: +Then the module should be configured using `VirtualFileSystemOptions` to register the embedded files to the virtual file system. Example: ````C# using Microsoft.Extensions.DependencyInjection; @@ -70,7 +70,7 @@ namespace MyCompany.MyProject } ```` -`AddEmbedded` extension method takes a class, finds all embedded files from the assembly of the given class and register to the virtual file system. It's a shortcut and could be written as shown below: +The `AddEmbedded` extension method takes a class, finds all embedded files from the assembly of the given class and registers them to the virtual file system. More concisely it could be written as shown below: ````C# options.FileSets.Add(new EmbeddedFileSet(typeof(MyModule).Assembly)); @@ -102,13 +102,13 @@ public class MyService } ```` -#### Dealing Embedded Files On The Development +#### Dealing With Embedded Files During Development -Embedding a file into a module assembly and using it from another project by just referencing the assembly (or adding a nuget package) is very valuable for creating a re-usable module. However, it makes a bit hard to develop the module itself. +Embedding a file into a module assembly and using it from another project by just referencing the assembly (or adding a nuget package) is very valuable for creating a re-usable module. However, it makes it a bit hard to develop the module itself. Assume that you are developing a module that contains an embedded JavaScript file. Whenever you change the file you must re-compile the project, re-start the application and refresh the browser page to take the change. Obviously, it is very time consuming and tedious. -What if the application could directly use the physical file in the development time? Thus, you could just refresh the browser page to see any change in the JavaScript file. `ReplaceEmbeddedByPyhsical` method makes that possible. +What is needed is the ability for the application to directly use the physical file at development time and a browser refresh shows any change in the JavaScript file. `ReplaceEmbeddedByPyhsical` method makes that possible. The example below shows an application depends on a module (`MyModule`) that contains embedded files and the application can reach the source code of the module on the development time. @@ -162,4 +162,4 @@ Adding virtual files middleware after the static files middleware makes it possi Embedded razor views/pages are available in the application without any configuration. Just place them into standard Views/Pages virtual folders in the module development. -An embedded view/page can be overrided if a module/application locate a new file into the same location. \ No newline at end of file +An embedded view/page can be overrided if a module/application locates a new file into the same location. diff --git a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IIDentityClaimTypeRepository.cs b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IIDentityClaimTypeRepository.cs index bfc62de497..e55bdd966b 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IIDentityClaimTypeRepository.cs +++ b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IIDentityClaimTypeRepository.cs @@ -9,5 +9,9 @@ namespace Volo.Abp.Identity public interface IIdentityClaimTypeRepository : IBasicRepository { Task DoesNameExist(string name, Guid? claimTypeId = null); + + Task> GetListAsync(string sorting, int maxResultCount, int skipCount); + + Task GetTotalCount(); } } diff --git a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdenityClaimTypeManager.cs b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdenityClaimTypeManager.cs index a75bb566a7..eac38b9f24 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdenityClaimTypeManager.cs +++ b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdenityClaimTypeManager.cs @@ -7,7 +7,7 @@ using Volo.Abp.Guids; namespace Volo.Abp.Identity { - public class IdenityClaimTypeManager : IDomainService + public class IdenityClaimTypeManager : DomainService { private readonly IIdentityClaimTypeRepository _identityClaimTypeRepository; private readonly IGuidGenerator _guidGenerator; @@ -18,12 +18,7 @@ namespace Volo.Abp.Identity _guidGenerator = guidGenerator; } - public async Task GetAsync(Guid id) - { - return await _identityClaimTypeRepository.GetAsync(id); - } - - public async Task CreateAsync(IdentityClaimType claimType) + public virtual async Task CreateAsync(IdentityClaimType claimType) { if (await _identityClaimTypeRepository.DoesNameExist(claimType.Name)) { @@ -33,19 +28,20 @@ namespace Volo.Abp.Identity return await _identityClaimTypeRepository.InsertAsync(claimType); } - public async Task UpdateAsync(IdentityClaimType claimType) + public virtual async Task UpdateAsync(IdentityClaimType claimType) { if (await _identityClaimTypeRepository.DoesNameExist(claimType.Name, claimType.Id)) { throw new AbpException($"Name Exist: {claimType.Name}"); } - return await _identityClaimTypeRepository.UpdateAsync(claimType); - } + if (claimType.IsStatic) + { + throw new AbpException($"Can not update a static ClaimType."); + } + - public async Task DeleteAsync(Guid id) - { - await _identityClaimTypeRepository.DeleteAsync(id); + return await _identityClaimTypeRepository.UpdateAsync(claimType); } } } diff --git a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityClaimTypeRepository.cs b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityClaimTypeRepository.cs index 81cab3ee8c..772ec91220 100644 --- a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityClaimTypeRepository.cs +++ b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityClaimTypeRepository.cs @@ -1,10 +1,9 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text; +using System.Linq.Dynamic.Core; using System.Threading.Tasks; using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Internal; using Volo.Abp.Domain.Repositories.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore; @@ -20,5 +19,19 @@ namespace Volo.Abp.Identity.EntityFrameworkCore { return await DbSet.WhereIf(claimTypeId != null, ct => ct.Id == claimTypeId).CountAsync(ct => ct.Name == name) > 0; } + + public async Task> GetListAsync(string sorting, int maxResultCount, int skipCount) + { + var identityClaimTypes = await DbSet.OrderBy(sorting ?? "name desc") + .PageBy(skipCount, maxResultCount) + .ToListAsync(); + + return identityClaimTypes; + } + + public async Task GetTotalCount() + { + return await DbSet.CountAsync(); + } } } diff --git a/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityClaimTypeRepository.cs b/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityClaimTypeRepository.cs index 3d80cc6520..fbc51bd773 100644 --- a/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityClaimTypeRepository.cs +++ b/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityClaimTypeRepository.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text; +using System.Linq.Dynamic.Core; using System.Threading.Tasks; using MongoDB.Driver.Linq; using Volo.Abp.Domain.Repositories.MongoDB; @@ -19,5 +19,19 @@ namespace Volo.Abp.Identity.MongoDB { return GetMongoQueryable().WhereIf(claimTypeId != null, ct => ct.Id == claimTypeId).Count(ct => ct.Name == name) > 0; } + + public async Task> GetListAsync(string sorting, int maxResultCount, int skipCount) + { + var identityClaimTypes = GetMongoQueryable().OrderBy(sorting ?? "name desc") + .PageBy(skipCount, maxResultCount) + .ToList(); + + return identityClaimTypes; + } + + public async Task GetTotalCount() + { + return await GetMongoQueryable().CountAsync(); + } } } diff --git a/nupkg/common.ps1 b/nupkg/common.ps1 index 56185a36d7..aeabf7f2bf 100644 --- a/nupkg/common.ps1 +++ b/nupkg/common.ps1 @@ -10,6 +10,7 @@ $solutions = ( "modules/permission-management", "modules/tenant-management", "modules/identity", + "modules/identityserver", "modules/account", "modules/audit-logging", "modules/background-jobs", @@ -123,7 +124,12 @@ $projects = ( "modules/identity/src/Volo.Abp.Identity.MongoDB", "modules/identity/src/Volo.Abp.Identity.HttpApi", "modules/identity/src/Volo.Abp.Identity.HttpApi.Client", - "modules/identity/src/Volo.Abp.Identity.Web", + "modules/identity/src/Volo.Abp.Identity.Web", + + # modules/identityserver + "modules/identityserver/src/Volo.Abp.IdentityServer.Domain", + "modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared", + "modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore", # modules/account "modules/account/src/Volo.Abp.Account.Web",