diff --git a/University/UniversityDatabaseImplement/UniversityDatabase.cs b/University/UniversityDatabaseImplement/UniversityDatabase.cs index 2b73bad..07213d0 100644 --- a/University/UniversityDatabaseImplement/UniversityDatabase.cs +++ b/University/UniversityDatabaseImplement/UniversityDatabase.cs @@ -11,7 +11,7 @@ namespace UniversityDatabaseImplement if (optionsBuilder.IsConfigured == false) { //Возможно понадобится писать вместо (localdb) название пк, вот пк Егора: DESKTOP-N8BRIPR; other-name: LAPTOP-DYCTATOR; other-name: DyCTaTOR - optionsBuilder.UseSqlServer(@"Data Source=DyCTaTOR\SQLEXPRESS;Initial Catalog=UniversityDatabaseFull;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True"); + optionsBuilder.UseSqlServer(@"Data Source=DESKTOP-N8BRIPR\SQLEXPRESS;Initial Catalog=UniversityDatabaseFull;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True"); } base.OnConfiguring(optionsBuilder); } diff --git a/University/UniversityRestApi/Controllers/UserController.cs b/University/UniversityRestApi/Controllers/UserController.cs index 5bc8a2d..5374327 100644 --- a/University/UniversityRestApi/Controllers/UserController.cs +++ b/University/UniversityRestApi/Controllers/UserController.cs @@ -68,6 +68,19 @@ namespace UniversityRestApi.Controllers throw; } } + [HttpGet] + public List? GetAll() + { + try + { + return _logic.ReadList(null); + } + catch (Exception ex) + { + _logger.LogError(ex, "Ошибка"); + throw; + } + } [HttpPost] public void RegisterWorker(UserBindingModel model) {