Store the user statistics for the performance.

This commit is contained in:
Sébastien André
2021-08-11 22:37:14 +02:00
parent 6c53408c6d
commit 4c1dc89006
64 changed files with 453 additions and 1783 deletions

View File

@@ -14,7 +14,8 @@ namespace skydiveLogs_api.DomainBusiness
IDropZoneService dropZoneService,
IGearService gearService,
IJumpRepository jumpRepository,
IIdentityService identityService)
IIdentityService identityService,
IStatsService statsService)
{
_jumpTypeService = jumpTypeService;
_aircraftService = aircraftService;
@@ -22,6 +23,7 @@ namespace skydiveLogs_api.DomainBusiness
_gearService = gearService;
_jumpRepository = jumpRepository;
_identityService = identityService;
_statsService = statsService;
}
#endregion Public Constructors
@@ -46,11 +48,13 @@ namespace skydiveLogs_api.DomainBusiness
jump.User = _identityService.ConnectedUser;
_jumpRepository.Add(jump);
_statsService.Reset();
}
public void DeleteJumpById(int id)
{
_jumpRepository.DeleteById(id);
_statsService.Reset();
}
public IEnumerable<Jump> GetAllJumps()
@@ -83,6 +87,7 @@ namespace skydiveLogs_api.DomainBusiness
private readonly IIdentityService _identityService;
private readonly IJumpRepository _jumpRepository;
private readonly IJumpTypeService _jumpTypeService;
private readonly IStatsService _statsService;
#endregion Private Fields
}