1234567891011121314151617 |
- using BelovAPI.BaseConnection;
- using Microsoft.AspNetCore.Http;
- using Microsoft.AspNetCore.Mvc;
- using BelovAPI.BaseConnection;
- namespace BelovAPI.Controllers
- {
- [Route("api/[controller]/{name}")]
- [ApiController]
- [ApiExplorerSettings(GroupName = "Действия с пользователем")]
- public class UsersController : ControllerBase
- {
- ApplicationContext db = new ApplicationContext();
- [HttpGet]
- public IActionResult Index(string name) => Ok(db.User.Where(x => x.nameUser.Contains(name)).ToList());
- }
- }
|