public void DeleteProducts(products products)
 {
     try
     {
         _productRepo.Delete(products);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 2
0
        public Response <bool> Delete(int id)
        {
            Response <bool> Response  = new Response <bool>();
            var             categoria = _Irepository.GetById(id);

            try
            {
                Response.Data = _Irepository.Delete(categoria);
                if (Response.Data)
                {
                    Response.IsSuccess = true;
                    Response.Mensaje   = "Eliminacion exito!";
                }
            }
            catch (Exception ex)
            {
                Response.IsSuccess = false;
                Response.Mensaje   = ex.Message;
            }
            return(Response);
        }
Esempio n. 3
0
 public async Task <Player> Delete(Guid id)
 {
     return(await _repository.Delete(id.ToString()));
 }
Esempio n. 4
0
 public IActionResult DeleteCategory([FromRoute] int id)
 {
     _category.Delete(id);
     _category.save();
     return(Ok(_category.GetAll()));
 }