15 lines
358 B
C#
15 lines
358 B
C#
using AutoMapper;
|
|
using MetaCourse.Api.DTOs.UserCourses;
|
|
using MetaCourse.Api.Entities;
|
|
|
|
namespace MetaCourse.Api.Mappings;
|
|
|
|
public class UserCourseProfile : Profile
|
|
{
|
|
public UserCourseProfile()
|
|
{
|
|
CreateMap<UserCourse, GetEnrollmentDto>()
|
|
.ForMember(dest => dest.CourseTitle, opt => opt.MapFrom(src => src.Course.Title));
|
|
}
|
|
}
|