Add an endpoint to call the lof of jumps by page.
This commit is contained in:
@@ -48,6 +48,11 @@ namespace skydiveLogs_api.Infrastructure
|
||||
return _col.FindById(new BsonValue(id));
|
||||
}
|
||||
|
||||
public int GetCount()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public bool Update(Aircraft aircraft)
|
||||
{
|
||||
return _col.Update(aircraft);
|
||||
|
||||
@@ -48,6 +48,11 @@ namespace skydiveLogs_api.Infrastructure
|
||||
return _col.FindById(new BsonValue(id));
|
||||
}
|
||||
|
||||
public int GetCount()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public bool Update(DropZone updatedDz)
|
||||
{
|
||||
return _col.Update(updatedDz);
|
||||
|
||||
@@ -59,6 +59,11 @@ namespace skydiveLogs_api.Infrastructure
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public int GetCount()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public bool Update(FavoriteDropZone updated)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
|
||||
@@ -55,6 +55,11 @@ namespace skydiveLogs_api.Infrastructure
|
||||
return _col.FindById(new BsonValue(id));
|
||||
}
|
||||
|
||||
public int GetCount()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public bool Update(Gear updatedGear)
|
||||
{
|
||||
return _col.Update(updatedGear);
|
||||
|
||||
@@ -56,11 +56,35 @@ namespace skydiveLogs_api.Infrastructure
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public IEnumerable<Jump> GetBetweenIndex(User user, int beginIndex, int endIndex)
|
||||
{
|
||||
return _col.Include(x => x.Aircraft)
|
||||
.Include(x => x.DropZone)
|
||||
.Include(x => x.Gear)
|
||||
.Include(x => x.JumpType)
|
||||
.Query()
|
||||
.OrderByDescending(j => j.JumpDate)
|
||||
.Where(j => j.User.Id == user.Id)
|
||||
.Limit(endIndex - beginIndex)
|
||||
.Offset(beginIndex)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
public Jump GetById(int id)
|
||||
{
|
||||
return _col.FindById(new BsonValue(id));
|
||||
}
|
||||
|
||||
public int GetCount(User user)
|
||||
{
|
||||
return _col.Count(j => j.User.Id == user.Id);
|
||||
}
|
||||
|
||||
public int GetCount()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public bool Update(Jump updatedJump)
|
||||
{
|
||||
return _col.Update(updatedJump);
|
||||
|
||||
@@ -48,6 +48,11 @@ namespace skydiveLogs_api.Infrastructure
|
||||
return _col.FindById(new BsonValue(id));
|
||||
}
|
||||
|
||||
public int GetCount()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public bool Update(JumpType updatedJumpType)
|
||||
{
|
||||
return _col.Update(updatedJumpType);
|
||||
|
||||
@@ -55,6 +55,11 @@ namespace skydiveLogs_api.Infrastructure
|
||||
return _col.FindById(new BsonValue(id));
|
||||
}
|
||||
|
||||
public int GetCount()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public bool Update(UserImage image)
|
||||
{
|
||||
return _col.Update(image);
|
||||
|
||||
@@ -53,6 +53,11 @@ namespace skydiveLogs_api.Infrastructure
|
||||
return _col.FindOne(u => u.Login == login && u.Password == password);
|
||||
}
|
||||
|
||||
public int GetCount()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public bool Update(User updated)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
|
||||
@@ -55,6 +55,11 @@ namespace skydiveLogs_api.Infrastructure
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public int GetCount()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public bool Update(UserStats stats)
|
||||
{
|
||||
//col.UpdateMany(x => new Customer { Name
|
||||
|
||||
Reference in New Issue
Block a user