Created
August 9, 2022 15:50
-
-
Save cch12313/1d136fcc302b54f3a569529017e9e8bc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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