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.7.151 62 7/15/2024
8.3.261 103 3/26/2024
8.2.102 154 2/9/2024
8.2.101 85 2/7/2024
4.1.191 127 1/19/2024
4.1.181 82 1/19/2024
3.12.262 123 12/26/2023
3.12.261 72 12/26/2023
3.12.221 103 12/22/2023
3.12.151 107 12/17/2023
3.6.221 3,324 6/22/2022
3.4.111 630 4/11/2022
3.2.241 606 2/24/2022
3.2.171 649 2/17/2022
3.2.151 625 2/15/2022
3.2.142 634 2/14/2022
3.2.141 613 2/14/2022
3.2.21 651 2/2/2022
3.1.243 618 1/25/2022
3.1.242 654 1/24/2022
3.1.241 632 1/24/2022
3.1.221 629 1/22/2022
3.1.201 633 1/20/2022
3.1.101 659 1/10/2022
2.12.291 412 12/29/2021
2.12.102 490 12/10/2021
2.12.101 407 12/10/2021
2.12.71 418 12/7/2021
2.11.241 4,337 11/24/2021
1.9.81 574 9/8/2021
1.7.61 613 7/6/2021
1.6.251 511 6/25/2021
1.6.101 512 6/10/2021
1.5.311 787 5/31/2021
1.5.281 642 5/28/2021
1.5.171 756 5/17/2021
1.5.141 521 5/14/2021
1.5.132 526 5/13/2021
1.5.131 490 5/13/2021
1.4.301 504 4/30/2021
1.4.221 461 4/22/2021
1.4.220 477 4/22/2021
1.4.120 467 4/12/2021
1.4.81 592 4/8/2021
1.4.21 447 4/2/2021
1.4.20 436 4/2/2021
1.0.19 554 4/1/2021
1.0.18 489 3/16/2021
1.0.17 471 3/15/2021
1.0.16 456 3/15/2021
1.0.15 473 3/8/2021
1.0.11 444 3/2/2021
1.0.10 439 3/1/2021
1.0.9 438 2/12/2021
1.0.8 529 2/11/2021
1.0.7 448 2/11/2021
1.0.6 458 2/11/2021
1.0.5 468 2/11/2021
1.0.4 457 2/11/2021
1.0.3 456 2/9/2021
1.0.2 430 2/3/2021
1.0.1 547 2/1/2021
1.0.0 559 1/29/2021