Hands-On Domain-Driven Design with .NET Core: Tackling complexity in the heart of software by putting DDD principles into practice by Zimarev Alexey

Hands-On Domain-Driven Design with .NET Core: Tackling complexity in the heart of software by putting DDD principles into practice by Zimarev Alexey

Author:Zimarev, Alexey [Zimarev, Alexey]
Language: eng
Format: azw3
Tags: COM051310 - COMPUTERS / Programming Languages / C#, COM048000 - COMPUTERS / Systems Architecture / Distributed Systems and Computing, COM011000 - COMPUTERS / Systems Architecture / General
Publisher: Packt Publishing
Published: 2019-04-29T16:00:00+00:00


public void RequestToPublish() =>

Apply(new ClassidiedAdSentForReview {Id = Id});

protected override void When(object @event)

{

switch (@event)

{

case ClassifiedAdCreated e:

Id = new ClassifiedAdId(e.Id);

OwnerId = new UserId(e.OwnerId);

State = ClassifiedAdState.Inactive;

break;

case ClassifiedAdTitleChanged e:

Title = new ClassifiedAdTitle(e.Title);

break;

case ClassifiedAdTextUpdated e:

Text = new ClassifiedAdText(e.AdText);

break;

case ClassifiedAdPriceUpdated e:

Price = new Price(e.Price, e.CurrencyCode);

break;

case ClassidiedAdSentForReview _:

State = ClassifiedAdState.PendingReview;

break;

}

}



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.