LSCore.Repository
1.1.3
See the version list below for details.
dotnet add package LSCore.Repository --version 1.1.3
NuGet\Install-Package LSCore.Repository -Version 1.1.3
<PackageReference Include="LSCore.Repository" Version="1.1.3" />
paket add LSCore.Repository --version 1.1.3
#r "nuget: LSCore.Repository, 1.1.3"
// Install LSCore.Repository as a Cake Addin
#addin nuget:?package=LSCore.Repository&version=1.1.3
// Install LSCore.Repository as a Cake Tool
#tool nuget:?package=LSCore.Repository&version=1.1.3
LSCore
Free and open-source .NET Api framework
A .NET libraries which makes building your API faster and easier.
Check out sample-projects to see detailed implemetations
Contribution
To contribute fork this project, branch from develop
, make change and make PR onto develop
branch
Since there is no established protocol, your change may not be accepted.
Best thing to do is create issue and discuss change there until someone create protocol for the contributiors.
Code merged into main
is automatically packed and pushed to nuget
<br> <br> <br> <br>
Feature Examples
Entity Manager implementation
namespace Project.Contracts.IManagers
{
public interface IUserManager
{
LSCoreListResponse<UserEntity> GetMultiple();
}
}
namespace Project.Domain.Managers
{
public class UserManager : LSCoreBaseManager<UserManager, UserEntity> : IUserManager
{
public UserManager(ILogger<UserManager> logger, ProjectDbContext dbContext)
: base(logger, dbContext)
{
}
public LSCoreListResponse<UserEntity> GetMultiple() =>
Queryable()
.ToLSCoreListResponse();
}
}
Querying inside Entity Manager
// Return response as list of entities
public LSCoreListResponse<UserEntity> GetMultiple() =>
Queryable()
.ToLSCoreListResponse();
// Return response as Sorted And Paged list of entities
// UsersGetMultipleRequest is request class which inherits : LSCoreSortablePageableRequest<UsersSortColumnCodes.Users>
public LSCoreListResponse<UserEntity> GetMultiple(UsersGetMultipleRequest request) =>
Queryable()
.ToLSCoreSortedPagedResponse<UserEntity, UsersSortColumnCodes.Users>(request, UsersSortColumnCodes.UsersSortRules);
// Filter query
public LSCoreListResponse<UserEntity> GetMultiple(UsersGetMultipleRequest request) =>
Queryable()
.LSCoreFilter(x => x.IsActive == true || x.Type == request.Type)
.ToLSCoreListResponse();
// Include (left join) on query
public LSCoreListResponse<UserEntity> GetMultiple(UsersGetMultipleRequest request) =>
Queryable()
.LSCoreIncludes(x => x.City)
.ToLSCoreListResponse();
// Then Include on query
public LSCoreListResponse<UserEntity> GetMultiple(UsersGetMultipleRequest request)
{
var response = new LSCoreListResponse<UserEntity>();
var qResponse = Queryable();
response.merge(qResponse);
if(response.NotOk)
return response;
var query = qResponse.Payload!;
var users = query
.Include(x => x.City)
.ThenInclude(x => x.Street);
response.Payload = users.ToList();
return response;
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net7.0
- LSCore.Contracts (>= 1.1.3)
- Microsoft.EntityFrameworkCore (>= 6.0.18)
- Microsoft.Extensions.Configuration.Abstractions (>= 7.0.0)
- Npgsql.EntityFrameworkCore.PostgreSQL (>= 6.0.8)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.2.0 | 38 | 5/26/2024 |
1.1.3 | 929 | 3/19/2024 |
1.1.2 | 580 | 2/10/2024 |
1.1.1 | 73 | 2/10/2024 |
1.1.0 | 73 | 2/9/2024 |
1.0.41 | 409 | 1/11/2024 |
1.0.40 | 129 | 1/10/2024 |
1.0.39 | 82 | 1/10/2024 |
1.0.38 | 200 | 1/7/2024 |
1.0.37 | 208 | 12/24/2023 |
1.0.36 | 124 | 12/23/2023 |
1.0.35 | 112 | 12/23/2023 |
1.0.34 | 102 | 12/23/2023 |
1.0.33 | 103 | 12/23/2023 |
1.0.32 | 107 | 12/17/2023 |
1.0.31 | 118 | 12/13/2023 |
1.0.30 | 112 | 12/13/2023 |
1.0.29 | 121 | 12/10/2023 |
1.0.28 | 120 | 12/9/2023 |
1.0.27 | 113 | 12/9/2023 |
1.0.26 | 121 | 12/9/2023 |
1.0.25 | 118 | 12/9/2023 |
1.0.24 | 123 | 12/9/2023 |
1.0.23 | 113 | 12/9/2023 |
1.0.22 | 137 | 12/3/2023 |
1.0.21 | 124 | 12/3/2023 |
1.0.20 | 121 | 12/3/2023 |
1.0.19 | 132 | 11/22/2023 |
1.0.18 | 115 | 11/16/2023 |
1.0.17 | 101 | 11/16/2023 |
1.0.16 | 115 | 11/10/2023 |
1.0.15 | 106 | 11/10/2023 |
1.0.14 | 110 | 11/10/2023 |
1.0.13 | 101 | 11/10/2023 |
1.0.12 | 103 | 11/10/2023 |
1.0.11 | 129 | 11/5/2023 |
1.0.10 | 117 | 11/5/2023 |
1.0.9 | 120 | 11/5/2023 |
1.0.8 | 117 | 11/5/2023 |
1.0.7 | 123 | 11/5/2023 |
1.0.6 | 118 | 11/5/2023 |
1.0.5 | 134 | 10/30/2023 |
1.0.4 | 125 | 10/30/2023 |
1.0.3 | 124 | 10/30/2023 |
1.0.2 | 104 | 12/16/2023 |
1.0.1 | 123 | 10/30/2023 |
1.0.1-alpha | 101 | 10/30/2023 |