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