-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathAutomapperProfile.cs
More file actions
31 lines (25 loc) · 1.04 KB
/
AutomapperProfile.cs
File metadata and controls
31 lines (25 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using AutoMapper;
using HwProj.CoursesService.API.Models;
using HwProj.Models.CoursesService;
using HwProj.Models.CoursesService.DTO;
using HwProj.Models.CoursesService.ViewModels;
namespace HwProj.CoursesService.API
{
public class AutomapperProfile : Profile
{
public AutomapperProfile()
{
CreateMap<Course, CreateCourseViewModel>().ReverseMap();
CreateMap<Course, UpdateCourseViewModel>().ReverseMap();
CreateMap<CourseMate, CourseMateViewModel>();
CreateMap<CreateHomeworkViewModel, Homework>();
CreateMap<HomeworkTask, HomeworkTaskViewModel>().ReverseMap();
CreateMap<PostTaskViewModel, HomeworkTask>().ReverseMap();
CreateMap<CreateCourseFilterDTO, CreateCourseFilterModel>();
CreateMap<Filter, CourseFilterDTO>();
CreateMap<UpdateGroupViewModel, Group>().ReverseMap();
CreateMap<Group, UserGroupDescription>();
CreateMap<GroupMateViewModel, GroupMate>().ReverseMap();
}
}
}