Skip to content

Instantly share code, notes, and snippets.

@Adolfi
Created Mar 28, 2022
Embed
What would you like to do?
public class ProductsController : UmbracoApiController
{
private readonly IEmailService emailService;
public ProductsController(IEmailService emailService)
{
this.emailService = emailService;
}
public IEnumerable<string> GetAllProducts()
{
this.emailService.SendEmailToAdmin();
return new[] { "Table", "Chair", "Desk", "Computer", "Beer fridge" };
}
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment