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