示例#1
0
        public TItem CreateAndAttachItem()
        {
            var item = _repository.CreateAndAttachItem();

            _events?.OnCreating(item);
            _savableItems.Add(item);
            return(item);
        }
示例#2
0
        protected override TItem CreateAttachAndSetItem()
        {
            if (!_identifierInfo.AllowsUpsert)
            {
                return(null);
            }

            TItem item = _repository.CreateAndAttachItem();

            _identifierInfo.SetValue(item, Identifier);
            return(item);
        }
示例#3
0
 protected override TItem CreateAttachAndSetItem()
 {
     return(_navRepository.CreateAndAttachItem());
 }