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