public async Task <IActionResult> DeleteConfirmed(int id)
        {
            try
            {
                bool result = await _repo.Delete(id);

                if (result)
                {
                    return(RedirectToAction("Index"));
                }
                return(View("Delete", new { id }));
            }
            catch
            {
                return(RedirectToAction("Error", "Home"));
            }
        }
Exemple #2
0
 public ResponseModel Delete(Testimonial testimonial)
 {
     return(_testimonialRepository.Delete(testimonial));
 }