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