1234567891011121314151617181920212223242526272829303132333435363738 |
- using androidAPI.BaseConneckion;
- using androidAPI.ModelBase;
- using Microsoft.AspNetCore.Mvc;
- using Microsoft.AspNetCore.WebUtilities;
- using Microsoft.VisualBasic;
- using System.Net;
- using System.Reflection;
- namespace androidAPI.Controllers
- {
- [Route("api/[controller]")]
- [ApiController]
- [ApiExplorerSettings(GroupName = "Узнаем о собачках")]
- public class PutController : Controller
- {
- MainTheApplication oo = new MainTheApplication();
- //[Route("api/[controller]")]
- [HttpPut]
- public IActionResult Index(Inform pip)
- {
- Inform inform = oo.DogiTut.FirstOrDefault(x => x.idF == pip.idF);
- if (inform == null)
- {
- throw new NotImplementedException("This method is not implemented");
- }
- inform.nameDog = pip.nameDog;
- inform.ageDog = pip.ageDog;
- inform.idGender = pip.idGender;
- inform.idBreed = pip.idBreed;
- oo.SaveChanges();
- return Ok(inform);
- }
-
- }
- }
|