示例#1
0
        public void InsertCader(SKL_Cader cader)
        {
            if (cader == null)
            {
                throw new ArgumentNullException("cader");
            }

            _caderRepository.Insert(cader);

            //event notification
            _eventPublisher.EntityInserted(cader);
        }
示例#2
0
        public void UpdateCader(SKL_Cader cader)
        {
            if (cader == null)
            {
                throw new ArgumentNullException("cader");
            }

            _caderRepository.Update(cader);
            string key = string.Format(CADER_BY_ID_KEY, cader.Id);

            _cacheManager.Remove(key);
            //event notification
            _eventPublisher.EntityInserted(cader);
        }
示例#3
0
 public static SKL_Cader ToEntity(this SKL_CaderModel model, SKL_Cader destination)
 {
     return(model.MapTo(destination));
 }
示例#4
0
 public static SKL_CaderModel ToModel(this SKL_Cader entity)
 {
     return(entity.MapTo <SKL_Cader, SKL_CaderModel>());
 }