Skip to content

Instantly share code, notes, and snippets.

@merken
Created October 16, 2019 07:25
Show Gist options
  • Save merken/9fa7a0f57e3d010456bec4ee39d4addd to your computer and use it in GitHub Desktop.
Save merken/9fa7a0f57e3d010456bec4ee39d4addd to your computer and use it in GitHub Desktop.
HelloController.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Contract;
namespace MyHost.Controllers
{
[ApiController]
[Route("[controller]")]
public class HelloController : ControllerBase
{
private readonly IHelloWorldPlugin _helloWorldPlugin;
public HelloController(IHelloWorldPlugin helloWorldPlugin)
{
_helloWorldPlugin = helloWorldPlugin;
}
[HttpGet]
public string Get([FromQuery]string input)
{
return _helloWorldPlugin.SayHello(input);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment