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); }
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); }
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); }