Skip to content

Instantly share code, notes, and snippets.

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 KeesCBakker/f9b645e9b43a5deddb2457629d9cec6f to your computer and use it in GitHub Desktop.
Save KeesCBakker/f9b645e9b43a5deddb2457629d9cec6f to your computer and use it in GitHub Desktop.
public interface IMessageService
{
string GetMessage();
}
[ApiController]
[Route("")]
public class MyController : ControllerBase
{
private readonly IMessageService _messageService;
public MyController(IMessageService messageService)
{
_messageService = messageService;
}
[HttpGet]
public string Get()
{
return _messageService.GetMessage();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment