Store the user statistics for the performance.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user