12345678910111213141516171819202122232425262728293031323334 |
- using androidAPI.BaseConneckion;
- using Microsoft.AspNetCore.Mvc;
- using Microsoft.AspNetCore.Http;
- using Google;
- using androidAPI.ModelBase;
- using System.Reflection.Metadata.Ecma335;
- namespace androidAPI.Controllers
- {
- [Route("api/[controller]")]
- [ApiController]
- [ApiExplorerSettings(GroupName = "Узнаем о собачках")]
- public class DogController : ControllerBase
- {
- MainTheApplication oo = new MainTheApplication();
- //[Route("api/[controller]")]
- [HttpGet]
- public IActionResult Index() => Ok(oo.DogiTut.ToList());
- //[Route("api/[controller]")]
- [HttpPost]
- public IActionResult Index(Inform inform)
- {
- oo.Add(inform);
- oo.SaveChanges();
- return Ok(inform);
- }
- }
-
-
-
- }
|