using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using PSTW_CentralSystem.DBContext; namespace PSTW_CentralSystem.Controllers.API { [ApiController] [Route("[controller]")] public class RoleAPI : Controller { private readonly ILogger _logger; private readonly IdentityDBContext _authDbContext; public RoleAPI(ILogger logger, IdentityDBContext authDbContext) { _logger = logger; _authDbContext = authDbContext; } [HttpPost("GetRoleList")] public async Task GetRoleList() { var roleList = await _authDbContext.Roles.Where(r => r.Id != 1 && r.Id != 2).ToListAsync(); return Json(roleList); } } }