Mvp24Hours.Application 3.1.101

There is a newer version of this package available.
See the version list below for details.
dotnet add package Mvp24Hours.Application --version 3.1.101
NuGet\Install-Package Mvp24Hours.Application -Version 3.1.101
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="Mvp24Hours.Application" Version="3.1.101" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Mvp24Hours.Application --version 3.1.101
#r "nuget: Mvp24Hours.Application, 3.1.101"
#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 Mvp24Hours.Application as a Cake Addin
#addin nuget:?package=Mvp24Hours.Application&version=3.1.101

// Install Mvp24Hours.Application as a Cake Tool
#tool nuget:?package=Mvp24Hours.Application&version=3.1.101

How to use a service repository?

You will be able to reduce the complexity of building services in the application layer using patterns from the Mvp24Hours architecture.

Prerequisites

Perform installation and configuration to use a relational or NoSQL database.

Basic Repository Service

Inheritance

public class EntityService : RepositoryService<Entity, IUnitOfWork> { ... }

Predefined Methods

We use the BusinessService / BusinessObject pattern to encapsulate the response data in the application layer. The methods are:

IBusinessResult<bool> ListAny();
IBusinessResult<int> ListCount();
IBusinessResult<IList<TEntity>> List();
IBusinessResult<IList<TEntity>> List(IPagingCriteria criteria);
IBusinessResult<bool> GetByAny(Expression<Func<TEntity, bool>> clause);
IBusinessResult<int> GetByCount(Expression<Func<TEntity, bool>> clause);
IBusinessResult<IList<TEntity>> GetBy(Expression<Func<TEntity, bool>> clause);
IBusinessResult<IList<TEntity>> GetBy(Expression<Func<TEntity, bool>> clause, IPagingCriteria criteria);
IBusinessResult<TEntity> GetById(object id);
IBusinessResult<TEntity> GetById(object id, IPagingCriteria criteria);

User-Defined Methods

In this example we will use the referral to get customer contacts. Up to two contacts will be uploaded for each customer, see:

public IList<Customer> GetWithContacts()
{
    // create paging for client
    var paging = new PagingCriteria(3, 0);

    // get client repository instance
    var rpCustomer = UnitOfWork.GetRepository<Customer>();

    // apply filter for customers who have contacts with paging
    var customers = rpCustomer.GetBy(x => x.Contacts.Any(), paging);

    // scrolls through customer results to load contacts (late load with filter and/or paging)
    foreach (var customer in customers)
    {
        rpCustomer.LoadRelation(customer, x => x.Contacts, clause: c => c.Active, limit: 2);
    }
    return customers;
}

Basic Services

You can reference the following services as a basis for specialization (Mvp24Hours.Application.Logic):

  • RepositoryService: query and commands;
  • RepositoryPagingService: query, paged query and commands.
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  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. 
.NET Core netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
8.3.261 93 3/26/2024
8.2.102 143 2/9/2024
8.2.101 77 2/7/2024
4.1.191 117 1/19/2024
4.1.181 76 1/19/2024
3.12.262 121 12/26/2023
3.12.261 71 12/26/2023
3.12.221 102 12/22/2023
3.12.151 106 12/17/2023
3.6.221 2,921 6/22/2022
3.4.111 626 4/11/2022
3.2.241 555 2/24/2022
3.2.171 648 2/17/2022
3.2.151 624 2/15/2022
3.2.142 633 2/14/2022
3.2.141 610 2/14/2022
3.2.21 650 2/2/2022
3.1.243 616 1/25/2022
3.1.242 653 1/24/2022
3.1.241 631 1/24/2022
3.1.221 628 1/22/2022
3.1.201 632 1/20/2022
3.1.101 657 1/10/2022
2.12.291 410 12/29/2021
2.12.102 489 12/10/2021
2.12.101 406 12/10/2021
2.12.71 417 12/7/2021
2.11.241 4,334 11/24/2021
1.9.81 566 9/8/2021
1.7.61 609 7/6/2021
1.6.251 505 6/25/2021
1.6.101 508 6/10/2021
1.5.311 756 5/31/2021
1.5.281 635 5/28/2021
1.5.171 659 5/17/2021
1.5.141 519 5/14/2021
1.5.132 522 5/13/2021
1.5.131 488 5/13/2021
1.4.301 495 4/30/2021
1.4.221 458 4/22/2021
1.4.220 474 4/22/2021
1.4.120 464 4/12/2021
1.4.81 588 4/8/2021
1.4.21 446 4/2/2021
1.4.20 431 4/2/2021
1.0.19 550 4/1/2021
1.0.18 484 3/16/2021
1.0.17 468 3/15/2021
1.0.16 453 3/15/2021
1.0.15 470 3/8/2021
1.0.11 440 3/2/2021
1.0.10 432 3/1/2021
1.0.9 434 2/12/2021
1.0.8 526 2/11/2021
1.0.7 445 2/11/2021
1.0.6 455 2/11/2021
1.0.5 465 2/11/2021
1.0.4 454 2/11/2021
1.0.3 451 2/9/2021
1.0.2 428 2/3/2021
1.0.1 545 2/1/2021
1.0.0 555 1/29/2021