Пример #1
0
        public HttpResponseMessage Delete(long id)
        {
            _billRepository.Delete(id);
            HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK);

            return(response);
        }
Пример #2
0
        public async Task <IActionResult> DeleteBill(Guid id)
        {
            if (!await _billRepository.EntryExists(id))
            {
                return(NotFound());
            }

            await _billRepository.Delete(id);

            return(NoContent());
        }
Пример #3
0
 public async Task <IHttpActionResult> Delete(string id)
 {
     try
     {
         _billRepo.Delete(b => b.Id == id);
         _unitOfWork.Commit();
     }
     catch (Exception)
     {
         return(InternalServerError());
     }
     return(Ok());
 }
Пример #4
0
 public void Delete(int id)
 {
     _billRepository.Delete(id);
 }
 public bool Delete(int Id)
 {
     return(_repository.Delete(Id));
 }
Пример #6
0
        public async Task Delete(long id)
        {
            var bill = await GetBillById(id);

            await _billRepository.Delete(bill);
        }
Пример #7
0
 public void DeleteBill(int id)
 {
     Repository.Delete(id);
     Repository.Save();
 }
Пример #8
0
 public bool Delete(int id)
 {
     return(billRepository.Delete(id));
 }
Пример #9
0
 public Bill Delete(int id)
 {
     return(_billRepository.Delete(id));
 }
Пример #10
0
 public void RemoveBill(int id)
 {
     repo.Delete(id);
     repo.Save();
 }
Пример #11
0
 /// <summary>
 /// Method whose purpose is to delete passed
 /// bill object in the database.
 /// </summary>
 /// <param name="bill">Existing bill model object.</param>
 /// <returns>Returns true if the query is successfully
 /// executed otherwise returns false.</returns>
 public bool Delete(BillModel bill)
 {
     return(_billBusinessLogic.Delete(bill) > 0 ? true : false);
 }
Пример #12
0
        public void DeleteBill(int billId)
        {
            var bill = billRepository.GetBy(billId);

            billRepository.Delete(bill);
        }