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);
        }
Esempio n. 2
0
        public async Task <IActionResult> DeleteBudget(Guid id)
        {
            if (!await _budgetRepository.EntryExists(id))
            {
                return(NoContent());
            }

            await _budgetRepository.Delete(id);

            return(NoContent());
        }
Esempio n. 3
0
        public Budget Delete(Guid id)
        {
            var Service = _repository.GetOne(id);

            _repository.Delete(Service);

            if (Commit())
            {
                return(Service);
            }

            return(null);
        }
Esempio n. 4
0
        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);
 }
Esempio n. 6
0
 public void DeleteBudget(Budget budget)
 {
     _budgetRepository.Delete(budget);
 }