Skip to content

Instantly share code, notes, and snippets.

@dcomartin
Created December 2, 2016 00:22
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/30e425d1b26e1a033dde29f5e6cb5d12 to your computer and use it in GitHub Desktop.
Save dcomartin/30e425d1b26e1a033dde29f5e6cb5d12 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