Skip to content

Instantly share code, notes, and snippets.

@pichayean
Last active May 4, 2021 12:48
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 pichayean/94a14492aef96be5122142e0f28f6600 to your computer and use it in GitHub Desktop.
Save pichayean/94a14492aef96be5122142e0f28f6600 to your computer and use it in GitHub Desktop.
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
namespace distributed_caching_redis.Controllers
{
[ApiController]
[Route("[controller]")]
public class UsersController : ControllerBase
{
private readonly IUsersService _usersService;
public UsersController(IUsersService usersService)
{
_usersService = usersService;
}
[HttpGet]
public async Task<IEnumerable<Users>> Get()
{
return await _usersService.GetUsersAsync();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment