public void TestDelete() { var entity = new Rate(); entity.Id = "testId"; _repository.Create(entity); _repository.Delete(entity.Id); Assert.Null(_repository.GetById(entity.Id)); }
public GeneralResponse DeleteRate(Rate rate) { if (rate == null) { throw new ApplicationException("Rate was not provided"); } var idResponse = GetByID(rate.ID); if (idResponse.Result == null) { throw new ApplicationException("Rate with ID " + rate.ID + " does not exists!"); } _repo.Delete(rate); return(new GeneralResponse()); }