Class UserProfileRepository
- Namespace
- Builvero.Infrastructure.Repositories
- Assembly
- Builvero.Infrastructure.dll
Repository implementation for user profile data access operations using Entity Framework Core.
public class UserProfileRepository : IUserProfileRepository
- Inheritance
-
UserProfileRepository
- Implements
- Inherited Members
Constructors
UserProfileRepository(ApplicationDbContext)
Initializes a new instance of the UserProfileRepository class.
public UserProfileRepository(ApplicationDbContext context)
Parameters
contextApplicationDbContextThe Entity Framework database context for data access.
Methods
PhoneNumberExistsAsync(string, Guid?, CancellationToken)
Checks if a user profile with the specified phone number exists in the database.
public Task<bool> PhoneNumberExistsAsync(string phoneNumber, Guid? excludeUserId = null, CancellationToken cancellationToken = default)
Parameters
phoneNumberstringThe phone number to check.
excludeUserIdGuid?Optional user ID to exclude from the check (useful when updating own profile).
cancellationTokenCancellationTokenCancellation token to cancel the operation.