BreedPostController.cs 556 B

123456789101112131415161718192021
  1. using androidAPI.BaseConneckion;
  2. using androidAPI.ModelBase;
  3. using Microsoft.AspNetCore.Mvc;
  4. namespace androidAPI.Controllers
  5. {
  6. [Route("api/[controller]")]
  7. [ApiController]
  8. [ApiExplorerSettings(GroupName = "Действия с породой")]
  9. public class BreedPostController : Controller
  10. {
  11. MainTheApplication oo = new MainTheApplication();
  12. [HttpPost]
  13. public IActionResult Index(Breed breed)
  14. {
  15. oo.Add(breed);
  16. oo.SaveChanges();
  17. return Ok(breed);
  18. }
  19. }
  20. }