Ejemplo n.º 1
0
        public async Task <IActionResult> Delete(int id)
        {
            try
            {
                var result = await _todoServices.Delete(id);

                if (result.Success)
                {
                    return(RedirectToAction("Index"));
                }
                else
                {
                    return(BadRequest());
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
                throw;
            }
        }
Ejemplo n.º 2
0
 public void Delete(Guid id)
 {
     _service.Delete(id);
 }