public void Delete_Test() { item.Id = 5; item.InitialBalance = 100; item.StartDate = DateTime.Now; item.EndDate = DateTime.Now; item.Balance = item.InitialBalance; budgetRepo.Delete(item); }
public async Task <IActionResult> DeleteBudget(Guid id) { if (!await _budgetRepository.EntryExists(id)) { return(NoContent()); } await _budgetRepository.Delete(id); return(NoContent()); }
public Budget Delete(Guid id) { var Service = _repository.GetOne(id); _repository.Delete(Service); if (Commit()) { return(Service); } return(null); }
public async Task <IActionResult> DeleteBill(int id, int userId) { if (userId != int.Parse(User.FindFirst(ClaimTypes.NameIdentifier).Value)) { return(Unauthorized()); } var user = await _repo.GetUser(userId); var photoFromRepo = await _repo.GetPhoto(id); _repo.Delete(photoFromRepo); if (await _repo.SaveAll()) { return(Ok()); } return(BadRequest("Failed to delete income.")); }
public async Task Delete(int id) { await _repository.Delete(id); }
public void DeleteBudget(Budget budget) { _budgetRepository.Delete(budget); }