12345678910111213141516171819 |
- using Microsoft.AspNetCore.Mvc;
- namespace API_development.Controllers
- {
- [Route("api/[controller]")]
- [ApiController]
- [ApiExplorerSettings(GroupName = "Действия с пользователем")]
- public class AddUserController : ControllerBase
- {
- ApplicationContext db = new ApplicationContext();
- [HttpPost]
- public IActionResult Index(Users user)
- {
- db.tbUsers.Add(user);
- db.SaveChanges();
- return Ok(user);
- }
- }
- }
|