成功写入Uesrs数据库表
This commit is contained in:
17
WorkStation.Server/Controllers/UserController.cs
Normal file
17
WorkStation.Server/Controllers/UserController.cs
Normal file
@ -0,0 +1,17 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using WorkStation.Server.Context.Entity;
|
||||
using WorkStation.Server.Services;
|
||||
using WorkStation.Share;
|
||||
|
||||
namespace WorkStation.Server.Controllers
|
||||
{
|
||||
[Route("api/[controller]/[action]")]
|
||||
[ApiController]
|
||||
public class UserController(IUserService service) : ControllerBase
|
||||
{
|
||||
private readonly IUserService _service = service;
|
||||
[HttpPost]
|
||||
public Task<ApiResponse> Add(User item) => _service.AddAsync(item);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user