public ActionResult Delete(int id) { var apiResult = TryExecute(() => { _emailTemplateRepository.Delete(id); _unitOfWork.Commit(); return(true); }, "Email Template deleted sucessfully"); return(Json(apiResult, JsonRequestBehavior.AllowGet)); }
public async Task DeleteEmailTemplateAsync(int id) { try { _emailTemplateRepository.Delete(id); await _uow.SaveChangesAsync(); } catch (Exception e) { throw e; } }
public override Result Apply(IEnumerable <int> ids) { var query = _emailTemplateRepository.AsNoTracking.Where(q => ids.Contains(q.Id)); var result = new Result().SetSuccess(string.Format(Messages.RecordDelete, query.Count())); foreach (var entity in query) { _emailTemplateRepository.Delete(entity); } _unitOfWork.Commit(); EmailTemplateCacheManager.ClearCache(); return(result); }
public JsonResult Delete(int id) { _emailTemplateRepository.Delete(id); return(Json("0")); }
public IHttpActionResult Delete(int id) { return(Ok(_objEmailTemplateRepository.Delete(id))); }
public void DeleteEmailTemplate(int id) { _emailTemplateRepository.Delete(id); }