Skip to content

Instantly share code, notes, and snippets.

@dcomartin
Created February 27, 2018 02:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dcomartin/a26c951abb9c4bef26ba0058a9dd2541 to your computer and use it in GitHub Desktop.
Save dcomartin/a26c951abb9c4bef26ba0058a9dd2541 to your computer and use it in GitHub Desktop.
public class AlbumAddedToCartHandler
: INotificationHandler<AlbumAddedToCart>
{
private readonly ILogger<AddToCart> _logger;
public AlbumAddedToCartHandler(ILogger<AddToCart> logger)
{
_logger = logger;
}
public void Handle(AlbumAddedToCart notification)
{
_logger.LogInformation("Album {albumId} was added to the cart.",
notification.AlbumId);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment