Na most működik az API + adatbázis

This commit is contained in:
2025-01-15 14:01:58 +01:00
parent 474dce1aa7
commit a2906cc113
17 changed files with 283 additions and 23 deletions
@@ -1,6 +1,7 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using WorkFlowCheck.BL.DTO;
using WorkFlowCheck.BL.Services.Interfaces;
namespace WorkFlowCheck.API.Controllers
{
@@ -8,15 +9,21 @@ namespace WorkFlowCheck.API.Controllers
[ApiController]
public class UserController : ControllerBase
{
private IUserService _userService;
public UserController(IUserService userService)
{
_userService = userService;
}
[HttpGet]
public async Task<ApiResponseDTO<UserDTO>> Get()
{
var userDTO = new UserDTO() { Id = 1, Email = "email", Name = "Name" };
var userDTO = await _userService.GetUser(1);
var retVal = new ApiResponseDTO<UserDTO>()
{
IsSuccess = true,
Data = userDTO
};
return retVal;
}
}