source: iknow-api/Repository/Interface/IUserRepository.cs@ c2f79d7

Last change on this file since c2f79d7 was c2f79d7, checked in by Stefan-Saveski <stefan@…>, 10 months ago

Refactor and enhance application structure

Enhanced error handling in AuthController with detailed exception handling for user registration. Updated UserDTO to improve JSON serialization and renamed enums for clarity. Introduced new entities (Major, PassedSubject, etc.) and seeded initial data in AppDbContext.

Replaced legacy migrations with 20251208203846_InitialCreate, reflecting the updated schema. Fixed typographical errors and improved JSON serialization in Program.cs with case-insensitive property matching and enum handling.

Refactored repository interfaces for better null safety. Improved debugging in AuthService and updated connection strings. Added the PassedSubject entity and cleaned up redundant code and unused imports for better maintainability.

  • Property mode set to 100644
File size: 572 bytes
Line 
1using iknow_api.Models;
2namespace iknow_api.Repositories
3{
4 public interface IUserRepository
5 {
6 Task<bool> UserExistsAsync(string username);
7 Task<User?> GetUserByUsernameAsync(string username);
8 Task AddUserAsync(User user);
9 Task AddContactAsync(ContactInfo contactInfo);
10 Task AddEnrollmentAsync(EnrollmentInfo enrollment);
11 Task AddHighSchoolAsync(HighSchool highSchool);
12 Task<int> GetUsersCountAsync();
13 Task<User?> GetUserByIdAsync(int id);
14 Task<User?> GetOnlyUserByIdAsync(int id);
15
16 }
17}
Note: See TracBrowser for help on using the repository browser.