Skip to content
Snippets Groups Projects
Commit 3063aa25 authored by esantangelo's avatar esantangelo
Browse files

commit

parent 5b245971
No related branches found
No related tags found
3 merge requests!20merge from develop,!16Feature/chat signalr,!14add 2 endpoints for report
This commit is part of merge request !14. Comments created here will be created in the context of that merge request.
......@@ -8,13 +8,13 @@ namespace Tsi1.BusinessLayer.Dtos
{
public TenantCourseDto()
{
CourseDtos = new List<CoursePreviewDto>();
Courses = new List<CoursePreviewDto>();
}
public int Id { get; set; }
public string Name { get; set; }
public List<CoursePreviewDto> CourseDtos { get; set; }
public List<CoursePreviewDto> Courses { get; set; }
}
}
......@@ -29,7 +29,7 @@ namespace Tsi1.BusinessLayer.Helpers
CreateMap<Course, CoursePreviewDto>();
CreateMap<Tenant, TenantPreviewDto>();
CreateMap<Tenant, TenantCreateDto>();
CreateMap<Tenant, TenantCourseDto>();
CreateMap<Tenant, TenantCourseDto>().ForMember(x => x.Courses, opt => opt.Ignore());
CreateMap<UserType, UserTypeDto>();
CreateMap<ForumCreateDto, Forum>();
......
......@@ -166,7 +166,7 @@ namespace Tsi1.BusinessLayer.Services
var courseDto = _mapper.Map<CoursePreviewDto>(course);
courseDto.StudentQuantity = course.StudentCourses.Count();
tenantDto.CourseDtos.Add(courseDto);
tenantDto.Courses.Add(courseDto);
}
tenantDtos.Add(tenantDto);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment