Esempio n. 1
0
 public IHttpActionResult Delete(int id)
 {
     Log.Debug(StringResources.DebugMethod +
               System.Reflection.MethodBase.
               GetCurrentMethod().Name);
     return(Ok(studentBl.Delete(id)));
 }
        public async Task <ActionResult <bool> > DeleteMasterProduct(int productId)
        {
            IBusiness <MasterProduct> productBusiness = BusinessFactory <MasterProduct> .Create();

            var result = await productBusiness.Delete(productId);

            return(Ok(result));
        }
        public async Task <ActionResult <bool> > DeleteTransOrder(int productId)
        {
            IBusiness <TransOrder> orderBusiness = BusinessFactory <TransOrder> .Create();

            var result = await orderBusiness.Delete(productId);

            return(Ok(result));
        }
 public ActionResult <string> Delete([FromBody] Author author)
 {
     _logger.LogInformation($"Received Delete from Author request with parameter value Author: {author.ID} - {author.Name}");
     if (!ModelState.IsValid)
     {
         return(BadRequest("Invalid Author"));
     }
     _autorBusiness.Delete(author);
     return(Ok("Delete Success"));
 }
Esempio n. 5
0
 public ActionResult <string> Delete([FromBody] Book book)
 {
     _logger.LogInformation($"Received Delete from Book request with parameter value Book: {book.ID} - {book.Title}");
     if (!ModelState.IsValid)
     {
         return(BadRequest("Invalid Book"));
     }
     _bookBusiness.Delete(book);
     return(Ok("Delete Success"));
 }
Esempio n. 6
0
 public ActionResult <string> Delete([FromBody] Rent Rent)
 {
     _logger.LogInformation($"Received Delete from Rent request with parameter value Rent: Book {Rent.Book.Title} - User: {Rent.User.Name}");
     if (!ModelState.IsValid)
     {
         return(BadRequest("Invalid Rent"));
     }
     _rentBusiness.Delete(Rent);
     return(Ok("Delete Success"));
 }
Esempio n. 7
0
 public ActionResult <string> Delete([FromBody] User User)
 {
     _logger.LogInformation($"Received Delete from User request with parameter value User: {User.ID} - {User.Name}");
     if (!ModelState.IsValid)
     {
         return(BadRequest("Invalid User"));
     }
     _userBusiness.Delete(User);
     return(Ok("Delete Success"));
 }
Esempio n. 8
0
        public IActionResult Del(Car car)
        {
            var result = _manager.Delete(car);

            if (result.Success)
            {
                return(Ok(result));
            }
            return(BadRequest(result));
        }
Esempio n. 9
0
        public async Task <IActionResult> DeleteEntity([FromRoute] int id)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            var entity = await _business.GetById(id);

            if (entity == null)
            {
                return(NotFound());
            }

            await _business.Delete(entity);

            return(Ok(entity));
        }
Esempio n. 10
0
 public void Delete(int id)
 {
     studentBL.Delete(id);
 }
Esempio n. 11
0
 //[Authorize("Bearer")]
 public IActionResult Delete(int id)
 {
     _receitaBusiness.Delete(id);
     return(NoContent());
 }
Esempio n. 12
0
 public void Delete(Author entity)
 {
     _authorBusiness.Delete(entity);
 }
        public async Task <IActionResult> Delete(int id)
        {
            await _projectBusiness.Delete(id);

            return(NoContent());
        }
Esempio n. 14
0
 public ActionResult Delete(long id)
 {
     _business.Delete(id);
     return(NoContent());
 }
Esempio n. 15
0
 //[Authorize("Bearer")]
 public IActionResult Delete(int id)
 {
     _categoriaBusiness.Delete(id);
     return(NoContent());
 }
Esempio n. 16
0
 //[Authorize("Bearer")]
 public IActionResult Delete(int id)
 {
     _usuarioBusiness.Delete(id);
     return(NoContent());
 }
Esempio n. 17
0
 public IHttpActionResult Remove(Guid id)
 {
     Log.Debug("" + System.Reflection.MethodBase.GetCurrentMethod().Name);
     return(Ok(studentBl.Delete(id)));
 }
Esempio n. 18
0
 /// <summary>
 /// 删除一条数据
 /// </summary>
 public bool Delete(string BusinessID)
 {
     return(dal.Delete(BusinessID));
 }