Refacto
This commit is contained in:
@@ -6,13 +6,13 @@ using System.Linq;
|
||||
|
||||
namespace skydiveLogs_api.DomainBusiness
|
||||
{
|
||||
public class StatsByByAircraftService : IStatsByAircraftService
|
||||
public class StatsByAircraftService : IStatsByAircraftService
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
public StatsByByAircraftService(IJumpService jumpService,
|
||||
IIdentityService identityService,
|
||||
IStatsByAircraftRepository statsByAircraftRepository)
|
||||
public StatsByAircraftService(IJumpService jumpService,
|
||||
IIdentityService identityService,
|
||||
IStatsByAircraftRepository statsByAircraftRepository)
|
||||
{
|
||||
_jumpService = jumpService;
|
||||
_identityService = identityService;
|
||||
@@ -33,11 +33,11 @@ namespace skydiveLogs_api.DomainBusiness
|
||||
|
||||
if (allJumps.Any())
|
||||
{
|
||||
results = [.. allJumps.GroupBy(j => j.DropZone.Name,
|
||||
results = [.. allJumps.GroupBy(j => j.Aircraft.Name,
|
||||
j => j,
|
||||
(groupby, jumps) => new StatsByAircraft
|
||||
{
|
||||
Label = groupby.ToString(),
|
||||
Aircraft = groupby.ToString(),
|
||||
Nb = jumps.Count(),
|
||||
User = _identityService.ConnectedUser
|
||||
})];
|
||||
|
||||
Reference in New Issue
Block a user