diff --git a/Back/skydiveLogs-api.DomainBusiness/JumpService.cs b/Back/skydiveLogs-api.DomainBusiness/JumpService.cs index 9f3c955..653ffeb 100644 --- a/Back/skydiveLogs-api.DomainBusiness/JumpService.cs +++ b/Back/skydiveLogs-api.DomainBusiness/JumpService.cs @@ -51,7 +51,7 @@ namespace skydiveLogs_api.DomainBusiness public void DeleteJumpById(int id) { - throw new NotImplementedException(); + _jumpRepository.DeleteById(id); } public IEnumerable GetAllJumps() diff --git a/Back/skydiveLogs-api.DomainService/Repositories/IJumpRepository.cs b/Back/skydiveLogs-api.DomainService/Repositories/IJumpRepository.cs index 085c5ff..fd11a8a 100644 --- a/Back/skydiveLogs-api.DomainService/Repositories/IJumpRepository.cs +++ b/Back/skydiveLogs-api.DomainService/Repositories/IJumpRepository.cs @@ -6,5 +6,7 @@ namespace skydiveLogs_api.DomainService.Repositories public interface IJumpRepository : IRepository { IEnumerable GetAll(User user); + + bool DeleteById(int id); } -} +} \ No newline at end of file diff --git a/Back/skydiveLogs-api.Infrastructure/JumpRepository.cs b/Back/skydiveLogs-api.Infrastructure/JumpRepository.cs index 7683194..f75137b 100644 --- a/Back/skydiveLogs-api.Infrastructure/JumpRepository.cs +++ b/Back/skydiveLogs-api.Infrastructure/JumpRepository.cs @@ -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