Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project>
<PropertyGroup>
<CSharpLanguageVersion>8</CSharpLanguageVersion>
<WarningsAsErrors>0612</WarningsAsErrors>
</PropertyGroup>

<PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion HwProj.Common/HwProj.Repositories/ReadOnlyRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public async Task<TEntity> GetAsync(TKey id)
return await Context.FindAsync<TEntity>(id).ConfigureAwait(false);
}

public async Task<TEntity> FindAsync(Expression<Func<TEntity, bool>> predicate)
public virtual async Task<TEntity> FindAsync(Expression<Func<TEntity, bool>> predicate)
{
return await Context.Set<TEntity>().AsNoTracking().FirstOrDefaultAsync(predicate).ConfigureAwait(false);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public static CourseDTO ToCourseDto(this Course course)
Name = course.Name,
GroupName = course.GroupName,
IsCompleted = course.IsCompleted,
MentorIds = course.MentorIds.Split("/"),
MentorIds = course.Mentors.Select(x => x.UserId).ToArray(),
IsOpen = course.IsOpen,
InviteCode = course.InviteCode,
CourseMates = course.CourseMates.Select(cm => cm.ToCourseMateViewModel()).ToArray(),
Expand All @@ -99,7 +99,7 @@ public static CoursePreview ToCoursePreview(this Course course)
Name = course.Name,
GroupName = course.GroupName,
IsCompleted = course.IsCompleted,
MentorIds = course.MentorIds.Split("/"),
MentorIds = course.Mentors.Select(x => x.UserId).ToArray(),
};

public static HomeworkTask ToHomeworkTask(this CreateTaskViewModel createTaskViewModel)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ public class LecturerAcceptToCourseEvent : Event
{
public long CourseId { get; set; }
public string CourseName { get; set; }
public string MentorIds { get; set; }
public string StudentId { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ public class LecturerRejectToCourseEvent : Event
{
public long CourseId { get; set; }
public string CourseName { get; set; }
public string MentorIds { get; set; }
public string StudentId { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ public class NewCourseMateEvent : Event
{
public long CourseId { get; set; }
public string CourseName { get; set; }
public string MentorIds { get; set; }
public string[] MentorIds { get; set; }
public string StudentId { get; set; }
public bool IsAccepted { get; set; }
}
Expand Down
Loading