This commit is contained in:
GokaPek 2024-05-27 22:35:15 +04:00
parent 702c845c1f
commit 58063233d7
2 changed files with 14 additions and 1 deletions

View File

@ -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);
}

View File

@ -68,6 +68,19 @@ namespace UniversityRestApi.Controllers
throw;
}
}
[HttpGet]
public List<UserViewModel>? GetAll()
{
try
{
return _logic.ReadList(null);
}
catch (Exception ex)
{
_logger.LogError(ex, "Ошибка");
throw;
}
}
[HttpPost]
public void RegisterWorker(UserBindingModel model)
{