LSCore.Contracts 1.1.3

dotnet add package LSCore.Contracts --version 1.1.3
NuGet\Install-Package LSCore.Contracts -Version 1.1.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LSCore.Contracts" Version="1.1.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add LSCore.Contracts --version 1.1.3
#r "nuget: LSCore.Contracts, 1.1.3"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install LSCore.Contracts as a Cake Addin
#addin nuget:?package=LSCore.Contracts&version=1.1.3

// Install LSCore.Contracts as a Cake Tool
#tool nuget:?package=LSCore.Contracts&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

GitHub last commit (branch) GitHub Release <br> Nuget Nuget <br> Nuget Nuget <br> Nuget Nuget <br> Nuget Nuget

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on LSCore.Contracts:

Package Downloads
LSCore.Repository

Package used to manage databases using EF inside LSCore ecosystem

LSCore.Domain

Logic implementation of the LSCore framework

LSCore.Framework

Framewrok used to build fast scalable .NET Web APIs

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.3 730 3/19/2024
1.1.2 590 2/10/2024
1.1.1 106 2/10/2024
1.1.0 122 2/9/2024
1.0.41 435 1/11/2024
1.0.40 149 1/10/2024
1.0.39 111 1/10/2024
1.0.38 238 1/7/2024
1.0.37 245 12/24/2023
1.0.36 133 12/23/2023
1.0.35 125 12/23/2023
1.0.34 131 12/23/2023
1.0.33 125 12/23/2023
1.0.32 135 12/17/2023
1.0.31 157 12/13/2023
1.0.30 137 12/13/2023
1.0.29 146 12/10/2023
1.0.28 149 12/9/2023
1.0.27 132 12/9/2023
1.0.26 148 12/9/2023
1.0.25 133 12/9/2023
1.0.24 146 12/9/2023
1.0.23 119 12/9/2023
1.0.22 155 12/3/2023
1.0.21 141 12/3/2023
1.0.20 134 12/3/2023
1.0.19 151 11/22/2023
1.0.18 134 11/16/2023
1.0.17 138 11/16/2023
1.0.16 136 11/10/2023
1.0.15 126 11/10/2023
1.0.14 132 11/10/2023
1.0.13 126 11/10/2023
1.0.12 126 11/10/2023
1.0.11 131 11/5/2023
1.0.10 120 11/5/2023
1.0.9 132 11/5/2023
1.0.8 128 11/5/2023
1.0.7 129 11/5/2023
1.0.6 131 11/5/2023
1.0.5 140 10/30/2023
1.0.4 130 10/30/2023
1.0.3 132 10/30/2023
1.0.2 133 10/30/2023
1.0.1 127 10/30/2023
1.0.1-alpha 104 10/30/2023
1.0.0 100 10/30/2023