Commit graph

31 commits

Author SHA1 Message Date
Pat Hartl
78da00a83d Change namespace of abstractions 2025-03-16 14:35:53 -05:00
Pat Hartl
46506ce383 Fix launcher login 2025-03-12 19:06:32 -05:00
Pat Hartl
b712f64bfd Remove use of UserManager for finding by name 2025-03-12 01:10:24 -05:00
Pat Hartl
0595386d50 Fix empty depot results
Fixes #183
2025-03-11 17:26:55 -05:00
Pat Hartl
0147b59002 Fix user custom fields not displayed on edit
Fixes #197
2025-03-08 14:13:51 -06:00
Pat Hartl
611c78a062 Clear user cache on role update 2025-02-21 23:36:52 -06:00
Pat Hartl
71911fa617 Increase performance of fetching game details 2025-02-16 13:24:23 -06:00
Pat Hartl
2909f151df Add tags to cache entries 2025-02-09 01:37:31 -06:00
Pat Hartl
361b5a5cee Fix user auth 2025-02-09 01:23:40 -06:00
Pat Hartl
832a087a63 Log error when roles cannot be retrieved 2025-02-08 23:23:06 -06:00
Pat Hartl
cef428acc1 Optimize UserService queries, cache user roles, clean up UserService 2025-02-08 12:32:54 -06:00
Pat Hartl
123a5827c3 Remove repository 2025-02-02 18:52:47 -06:00
Pat Hartl
af08645396 Remove use of DatabaseServiceFactory, update service dependency injection 2025-02-01 02:21:34 -06:00
Pat Hartl
dd4b961b56 Throw login errors properly 2025-01-25 13:51:00 -06:00
Pat Hartl
5ddb79b00a Fix first time setup 2025-01-22 20:54:41 -06:00
Pat Hartl
304f308474 WIP refactor of game importing 2025-01-12 02:54:41 -06:00
Pat Hartl
1a21aa34fe Fix user service unusable when in scope 2024-11-27 01:55:59 -06:00
Pat Hartl
5de9eccce1 Adjust Blazor server-side to pull data with new context 2024-11-25 22:29:56 -06:00
Pat Hartl
b52c84992e Remove mutex 2024-11-22 02:13:32 -06:00
Pat Hartl
00b9ca5953 Rename service and repository methods to async 2024-11-12 18:32:46 -06:00
Pat Hartl
3611cedb67 Implement interface properly 2024-11-12 00:00:31 -06:00
Pat Hartl
b5bddf806d Optimize controller routes for getting depot and library games 2024-11-11 18:22:30 -06:00
Pat Hartl
ddce80d296 Rename semaphore to mutex 2024-11-08 00:39:55 -06:00
Pat Hartl
eaa4b862f6 Make user service use mutex 2024-11-08 00:38:47 -06:00
Pat Hartl
2056b06207 Working new login page 2024-10-18 19:15:05 -05:00
Pat Hartl
c075d8f398 Use short lived database context for UserService methods 2024-10-16 18:32:48 -05:00
Pat Hartl
524f4c9573 Back to managers 2024-10-16 16:29:55 -05:00
Pat Hartl
91829f601d Enable navigation properties for user roles, use service in place of managers 2024-10-16 01:54:51 -05:00
Pat Hartl
d33ecc30e0 Remove usage of DatabaseContext outside Repository 2024-10-14 00:59:32 -05:00
Pat Hartl
2805f34449 WIP fix for MySQL connection concurrency issues
This is a large commit. There are a number of things that this commit does to try to fix various issues that were occurring when the database provider was set to MySQL:
- The DAL `Repository` has been completely refactored to follow best practices. The repository is now being injected into services instead of the database context itself. This allows the DI to handle the repository's lifetime instead of creating a new repository for every transaction and sharing the context across repositories. As part of these changes, there is no more allowed usage of `IQueryable` and all service/repository methods must actually execute database queries before their return. This is to ensure that the context does not stay open longer than it needs to. Abusing `IQueryable`s by tossing them into Blazor components seems to be a big no-no.
- Some deletion behaviors on relationships have been tweaked as MySQL wasn't able to apply migrations with behaviors that were contradictory.
- A `ConnectionInterceptor` was added to try to keep track of `DatabaseContext` lifetimes. This is really only for debugging and should be put into `#if DEBUG` regions. This helped identify some potential issues where some contexts were basically never closing, causing the MySQL connector to not function.
- Docs for generating migrations have been updated to reflect the addition of being able to specify the database provider and connection string when adding a migration, avoiding the need to edit `Settings.yml`
- The application can now be put into a pause state on startup by adding the `--debugger` argument when used from the command line. When a debugger is attached, it resumes execution.
- The application can now log to Seq when using debug build
- Service lifetime on `DatabaseContext` has switched to transient. This may be reverted in the future.
- Lazy loading has been disabled for debugging purposes. It didn't directly help the concurrency issues, but it needs to be tested individually to be re-enabled.
- All usage of `UserManager`, `RoleManager`, and `SignInManager` have been removed from all controllers, pages, and Blazor components. Functionality has been moved to `UserService` and `RoleService`. This might have done the most amount of help, but could probably be improved upon in the future by not relying on them and instead having our own implementation.
- Application startup migrations and server autostarts have been disabled temporarily. There might be an issue of `DatabaseContext` lifetimes that spawn from this.
2024-10-13 20:42:45 -05:00
Pat Hartl
91ee1d47a9 Move data and service layers to separate projects, update packages 2024-10-07 18:04:26 -05:00
Renamed from LANCommander.Server/Services/UserService.cs (Browse further)