Ejemplo n.º 1
0
 private void UpdateNotice(CreateOrUpdateNoticeInput input)
 {
     try {
         Notice model = input.notice.MapTo <Notice>();
         _noticeRespository.Update(model);
         _unitOfWorkManager.Current.SaveChanges();
     } catch (System.Data.Entity.Infrastructure.DbUpdateConcurrencyException ex) {
         throw new UserFriendlyException(L("UpdateByOther"));
     }
 }
Ejemplo n.º 2
0
 public void CreateOrUpdateNotice(CreateOrUpdateNoticeInput input)
 {
     if (!input.notice.Id.HasValue)
     {
         CreateNotice(input);
     }
     else
     {
         UpdateNotice(input);
     }
     _cacheManager.GetCache(_cacheAppName).RemoveAsync(_cacheNoticeListForUser); //清除给用户看的列表缓存
 }
Ejemplo n.º 3
0
        private void CreateNotice(CreateOrUpdateNoticeInput input)
        {
            Notice model = input.notice.MapTo <Notice>();

            _noticeRespository.Insert(model);
        }