Table of Contents

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

context ApplicationDbContext

The 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

phoneNumber string

The phone number to check.

excludeUserId Guid?

Optional user ID to exclude from the check (useful when updating own profile).

cancellationToken CancellationToken

Cancellation token to cancel the operation.

Returns

Task<bool>

True if a profile with the phone number exists (excluding the specified user); otherwise, false.