Add the jump type in the tunnel flight

This commit is contained in:
Sébastien ANDRE
2023-08-17 11:29:13 +02:00
parent 9237e14bcf
commit 01fa8b60d0
14 changed files with 100 additions and 66 deletions

View File

@@ -46,6 +46,7 @@ namespace skydiveLogs_api.Infrastructure
public IEnumerable<TunnelFlight> GetAll(User user)
{
return _col.Include(x => x.Tunnel)
.Include(x => x.JumpType)
.Find(j => j.User.Id == user.Id);
}
@@ -57,6 +58,7 @@ namespace skydiveLogs_api.Infrastructure
public IEnumerable<TunnelFlight> GetBetweenIndex(User user, int beginIndex, int endIndex)
{
return _col.Include(x => x.Tunnel)
.Include(x => x.JumpType)
.Query()
.OrderByDescending(j => j.FlightDate)
.Where(j => j.User.Id == user.Id)
@@ -68,6 +70,7 @@ namespace skydiveLogs_api.Infrastructure
public IEnumerable<TunnelFlight> GetBetweenDate(User user, DateTime beginDate, DateTime endDate)
{
return _col.Include(x => x.Tunnel)
.Include(x => x.JumpType)
.Query()
.OrderByDescending(j => j.FlightDate)
.Where(j => j.FlightDate >= beginDate)