Update the repository pattern

This commit is contained in:
Sébastien André
2019-11-10 19:31:55 +01:00
parent 3f1d648fa9
commit b95eedbf7c
19 changed files with 112 additions and 73 deletions

View File

@@ -17,7 +17,7 @@ namespace skydiveLogs_api.Business
public IEnumerable<Statistic> GetStatsByAircraft()
{
var allJumps = _jumpRepository.GetAllJumps();
var allJumps = _jumpRepository.GetAll();
return allJumps.GroupBy(j => j.AircraftId,
j => j,
@@ -31,7 +31,7 @@ namespace skydiveLogs_api.Business
public IEnumerable<Statistic> GetStatsByDz()
{
var allJumps = _jumpRepository.GetAllJumps();
var allJumps = _jumpRepository.GetAll();
return allJumps.GroupBy(j => j.DropZoneId,
j => j,
@@ -45,7 +45,7 @@ namespace skydiveLogs_api.Business
public IEnumerable<Statistic> GetStatsByJumpType()
{
var allJumps = _jumpRepository.GetAllJumps();
var allJumps = _jumpRepository.GetAll();
return allJumps.GroupBy(j => j.JumpTypeId,
j => j,
@@ -59,7 +59,7 @@ namespace skydiveLogs_api.Business
public IEnumerable<Statistic> GetStatsByRig()
{
var allJumps = _jumpRepository.GetAllJumps();
var allJumps = _jumpRepository.GetAll();
return allJumps.GroupBy(j => j.GearId,
j => j,
@@ -73,7 +73,7 @@ namespace skydiveLogs_api.Business
public IEnumerable<Statistic> GetStatsByYear()
{
var allJumps = _jumpRepository.GetAllJumps();
var allJumps = _jumpRepository.GetAll();
return allJumps.GroupBy(j => j.JumpDate.Year,
j => j,