Add the "delete" feature for the "Jump"

This commit is contained in:
Sébastien André
2021-04-20 10:38:37 +02:00
parent 49c2a87423
commit 64ace6a973
3 changed files with 9 additions and 2 deletions

View File

@@ -51,7 +51,7 @@ namespace skydiveLogs_api.DomainBusiness
public void DeleteJumpById(int id)
{
throw new NotImplementedException();
_jumpRepository.DeleteById(id);
}
public IEnumerable<Jump> GetAllJumps()

View File

@@ -6,5 +6,7 @@ namespace skydiveLogs_api.DomainService.Repositories
public interface IJumpRepository : IRepository<Jump>
{
IEnumerable<Jump> GetAll(User user);
bool DeleteById(int id);
}
}

View File

@@ -63,6 +63,11 @@ namespace skydiveLogs_api.Infrastructure
throw new System.NotImplementedException();
}
public bool DeleteById(int id)
{
return _col.Delete(new BsonValue(id));
}
#endregion Public Methods
#region Private Fields