示例#1
0
 public Task Handle(V1.Create command)
 => Handle(
     command.ClassifiedAdId,
     state => ClassifiedAd.Create(
         ClassifiedAdId.FromGuid(command.ClassifiedAdId),
         UserId.FromGuid(command.SellerId)
         )
     );
        public Task Handle(ClassifiedAds.V1.Create command)
        {
            var ad = ClassifiedAd.Create(
                command.Id,
                command.OwnerId,
                command.CreatedBy,
                command.CreatedAt);

            return(_store.Save(ad));
        }
 public Task Handle(ClassifiedAds.V1.Create command) =>
 _store.Save(ClassifiedAd.Create(
                 command.Id,
                 command.OwnerId,
                 command.CreatedBy));
 public async Task Handle(ClassifiedAds.V1.Create command) =>
 ClassifiedAd.Create(
     command.Id,
     command.OwnerId,
     command.CreatedBy);
 public Task Handle(Contracts.ClassifiedAds.V1.CreateAd command) =>
 _store.Save(ClassifiedAd.Create(command.Id, command.OwnerId, _getUtcNow));