Skip to content

Instantly share code, notes, and snippets.

@softwarejc
Created January 24, 2016 10:03
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 softwarejc/b08a35f1d47d38f20008 to your computer and use it in GitHub Desktop.
Save softwarejc/b08a35f1d47d38f20008 to your computer and use it in GitHub Desktop.
using System;
using Microsoft.AspNet.Mvc;
namespace GettingStarted_ASPNetCore1_Angular2.Controllers
{
[Route("api/[controller]")]
public class HelloController : Controller
{
[HttpGet]
public IActionResult Get(string name)
{
var time = DateTime.UtcNow.ToString("hh:mm:ss");
var response = new
{
message = $"{time} - Hello {name}, server-side speaking!"
};
return new ObjectResult(response);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment