Add the jump type in the tunnel flight
This commit is contained in:
@@ -29,6 +29,7 @@ namespace skydiveLogs_api.Infrastructure
|
||||
BsonMapper.Global.Entity<FavoriteDropZone>().DbRef(x => x.DropZone, "DropZone");
|
||||
|
||||
BsonMapper.Global.Entity<TunnelFlight>().DbRef(x => x.Tunnel, "DropZone");
|
||||
BsonMapper.Global.Entity<TunnelFlight>().DbRef(x => x.JumpType, "JumpType");
|
||||
BsonMapper.Global.Entity<TunnelFlight>().DbRef(x => x.User, "User");
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -1,17 +1,21 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<RootNamespace>skydiveLogs_api.Infrastructure</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<RootNamespace>skydiveLogs_api.Infrastructure</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="LiteDB" Version="5.0.17" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<FrameworkReference Include="Microsoft.AspNetCore.App" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\skydiveLogs-api.DomainService\skydiveLogs-api.DomainService.csproj" />
|
||||
<ProjectReference Include="..\skydiveLogs-api.Domain\skydiveLogs-api.Domain.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="LiteDB" Version="5.0.17" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\skydiveLogs-api.DomainService\skydiveLogs-api.DomainService.csproj" />
|
||||
<ProjectReference Include="..\skydiveLogs-api.Domain\skydiveLogs-api.Domain.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user