public void Do() { var domain = new Domain( name: new Name("default"), title: new Title("title"), profile: new Profile( name: new Name(@"3/Defaults"), href: new Uri(@"href://www.restms.org/spec:3/Defaults") ), version: new AggregateVersion(0) ); var feed = new Feed( feedType: FeedType.Default, name: new Name("default"), title: new Title("Default feed") ); domain.AddFeed(feed.Id); using (var scope = new TransactionScope()) { _domainRepository.Add(domain); _feedRepository.Add(feed); scope.Complete(); } }