GenderController.cs 569 B

12345678910111213141516171819202122
  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 GenderController : Controller
  10. {
  11. MainTheApplication oo = new MainTheApplication();
  12. [HttpPost]
  13. public IActionResult Index(Gender gender)
  14. {
  15. oo.Add(gender);
  16. oo.SaveChanges();
  17. return Ok(gender);
  18. }
  19. }
  20. }