Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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