using API_sm.BaseConnection; using API_sm.ModelBase; using Microsoft.AspNetCore.Mvc; namespace API_sm.Controllers { [Route("api/[controller]")] [ApiController] [ApiExplorerSettings(GroupName = "Добавление")] public class AddClient : ControllerBase { ApplicationContext db = new ApplicationContext(); [HttpPost] public IActionResult Index(Client client) { db.Add(client); db.SaveChanges(); return Ok(client); } } }