Skip to content

Instantly share code, notes, and snippets.

@dcomartin
Created November 18, 2016 01:57
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/2f7745e9ccb353e2f54289c45a81d122 to your computer and use it in GitHub Desktop.
Save dcomartin/2f7745e9ccb353e2f54289c45a81d122 to your computer and use it in GitHub Desktop.
public class AddToCartLogHandler : IPostRequestHandler<AddToCart, Unit>
{
private readonly ILogger<AddToCart> _logger;
public AddToCartLogHandler(ILogger<AddToCart> logger)
{
_logger = logger;
}
public void Handle(AddToCart request, Unit response)
{
_logger.LogInformation("Album {albumId} was added to the cart.", request.AlbumId);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment