public Guid Create(AuctionCreation command) { var auctionId = Guid.NewGuid(); var listingId = Guid.NewGuid(); var startingPrice = new Money(command.StartingPrice); var listing = new Listing(listingId, command.SellerId, new ListingFormat(auctionId, FormatType.Auction)); var auction = new Auction(auctionId, listingId, startingPrice, command.EndsAt); // Can seller list var seller = _sellerService.GetSeller(command.SellerId); if (seller != null && seller.CanList) { _listings.Add(listing); _auctions.Add(auction); } // _unitOfWork.SaveChanges(); return(auctionId); }