Skip to content

Instantly share code, notes, and snippets.

@cch12313
Created August 9, 2022 15:50
Show Gist options
  • Save cch12313/1d136fcc302b54f3a569529017e9e8bc to your computer and use it in GitHub Desktop.
Save cch12313/1d136fcc302b54f3a569529017e9e8bc to your computer and use it in GitHub Desktop.
public class SadService
{
public SadService()
{
Console.WriteLine("SadService Created");
}
public void Do()
{
Console.WriteLine("Oh oh oh oh oh oh oh oh...");
}
}
[ApiController]
[Route("[controller]")]
public class HeartController : ControllerBase
{
private readonly SadService _sad;
public HeartController(SadService sad)
{
_sad = sad;
}
[HttpGet]
public ActionResult Get()
{
_sad.Do();
return Ok();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment