コード例 #1
0
        public ActionResult Delete(int id)
        {
            var apiResult = TryExecute(() =>
            {
                _emailTemplateRepository.Delete(id);
                _unitOfWork.Commit();
                return(true);
            }, "Email Template deleted sucessfully");

            return(Json(apiResult, JsonRequestBehavior.AllowGet));
        }
コード例 #2
0
 public async Task DeleteEmailTemplateAsync(int id)
 {
     try
     {
         _emailTemplateRepository.Delete(id);
         await _uow.SaveChangesAsync();
     }
     catch (Exception e)
     {
         throw e;
     }
 }
コード例 #3
0
        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"));
 }
コード例 #5
0
 public IHttpActionResult Delete(int id)
 {
     return(Ok(_objEmailTemplateRepository.Delete(id)));
 }
コード例 #6
0
 public void DeleteEmailTemplate(int id)
 {
     _emailTemplateRepository.Delete(id);
 }