Update about the relation column "User" for the images
and begin to add a column in "Aircraft"
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
using LiteDB;
|
||||
|
||||
@@ -17,14 +16,15 @@ namespace skydiveLogs_api.Data
|
||||
_col = _dataProvider.CollOfJump;
|
||||
}
|
||||
|
||||
public IEnumerable<Jump> GetAll(int userId)
|
||||
public IEnumerable<Jump> GetAll(User user)
|
||||
{
|
||||
return _col.Include(x => x.Aircraft)
|
||||
.Include(x => x.DropZone)
|
||||
.Include(x => x.Gear)
|
||||
.Include(x => x.JumpType)
|
||||
.FindAll()
|
||||
.Where(j => j.UserId == userId)
|
||||
.Include(x => x.User)
|
||||
.Query()
|
||||
.Where(j => j.User == user)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user