public Results.GenericResult Delete(int id) { var result = new Results.GenericResult(); try { result.Success = appService.Delete(id); if (!result.Success) { throw new Exception($"Todo {id} can't be deleted"); } } catch (Exception ex) { result.Errors = new string[] { ex.Message }; } return(result); }
public bool Delete(int id) { return(_appService.Delete(id)); }