Exemplo n.º 1
0
 public void DeleteProducts(products products)
 {
     try
     {
         _productRepo.Delete(products);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo 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);
        }
Exemplo n.º 3
0
 public async Task <Player> Delete(Guid id)
 {
     return(await _repository.Delete(id.ToString()));
 }
Exemplo n.º 4
0
 public IActionResult DeleteCategory([FromRoute] int id)
 {
     _category.Delete(id);
     _category.save();
     return(Ok(_category.GetAll()));
 }