Class ProfilePhotoMapper
- Namespace
- Builvero.Application.Utilities
- Assembly
- Builvero.Application.dll
Maps profile photo data from entity to DTO with environment-based behavior. Single source of truth for profile photo URL mapping across all endpoints.
public static class ProfilePhotoMapper
- Inheritance
-
ProfilePhotoMapper
- Inherited Members
Methods
MapProfilePhotoAsync(UserProfile?, IHostEnvironment, Func<string, Task<string?>>?)
Maps profile photo data from UserProfile entity to DTO fields. Implements environment-based contract for backward compatibility with tests.
public static Task<(string? ProfilePhotoUrl, string? ProfilePhotoObjectKey)> MapProfilePhotoAsync(UserProfile? profile, IHostEnvironment environment, Func<string, Task<string?>>? generatePresignedUrl = null)
Parameters
profileUserProfileThe user profile entity
environmentIHostEnvironmentThe hosting environment
generatePresignedUrlFunc<string, Task<string>>Function to generate presigned URL from object key (only called in non-Test environments)