Exemple #1
0
 public virtual void Insert(T entity, Transaction transaction = null)
 {
     if (transaction == null)
     {
         EntitySet <T> .Insert(entity);
     }
     else
     {
         EntitySet <T> .Insert(entity, transaction.Value);
     }
     //publish the event so they can be handled
     _eventPublisherService.Publish(entity, EventType.Insert);
 }
Exemple #2
0
        public ItemDto SaveItem(ItemDto item)
        {
            var entity = item.Adapt <Item>();
            var result = _dbClient.Create(entity);

            _eventPublisher.Publish(entity);

            return(result.Adapt <ItemDto>());
        }
 public virtual void Insert(T entity)
 {
     _dataRepository.Insert(entity);
     //publish the event so they can be handled
     _eventPublisherService.Publish(entity, EventType.Insert);
 }
Exemple #4
0
 public virtual void Insert(T entity, bool reloadNavigationProperties = false)
 {
     _dataRepository.Insert(entity, reloadNavigationProperties);
     //publish the event so they can be handled
     _eventPublisherService.Publish(entity, EventType.Insert);
 }