예제 #1
0
        public async Task <IHttpActionResult> Delete(Guid id)
        {
            var result = await _certificateService.Delete(id);

            if (!result)
            {
                return(BadRequest());
            }

            return(Ok());
        }
예제 #2
0
 public IActionResult DeleteCertificate(int id)
 {
     try
     {
         _service.Delete(id);
         return(Ok("Record Deleted Successfully.."));
     }
     catch (AppException ex)
     {
         return(BadRequest(new { message = ex.Message }));
     }
 }
예제 #3
0
        public ActionResult Delete(string courseId, Certificate certificate)
        {
            try
            {
                _certificateRepository.Delete(certificate.Id);

                return(RedirectToAction("Details", "Course", new { Id = courseId }));
            }
            catch
            {
                return(View(certificate));
            }
        }
예제 #4
0
 public ActionResult DeleteConfirmed(Guid id)
 {
     certificateService.Delete(id);
     return(RedirectToAction("Index"));
 }