Skip to content
Snippets Groups Projects
Commit 96bec833 authored by Lucca Santangelo's avatar Lucca Santangelo
Browse files

rename dto

parent e17db0e7
No related branches found
No related tags found
1 merge request!34bedelia
......@@ -116,7 +116,7 @@ namespace Bedelia.Controllers
.Select(x => x.Id)
.FirstOrDefaultAsync();
var userIdentityCards = closeRecord.Users.Select(x => x.IdentityCard);
var userIdentityCards = closeRecord.UserGrades.Select(x => x.IdentityCard);
var users = await _context.Users
.Where(x => userIdentityCards.Contains(x.IdentityCard))
......@@ -125,7 +125,7 @@ namespace Bedelia.Controllers
var userCourses = new List<UserCourse>();
foreach (var user in users)
{
var grade = closeRecord.Users
var grade = closeRecord.UserGrades
.Where(x => x.IdentityCard == user.IdentityCard)
.Select(x => x.Grade)
.FirstOrDefault();
......
......@@ -9,6 +9,6 @@ namespace Bedelia.Dtos
public string CourseName { get; set; }
[Required]
public List<UserDto> Users { get; set; }
public List<UserGradeDto> UserGrades { get; set; }
}
}
......@@ -2,7 +2,7 @@
namespace Bedelia.Dtos
{
public class UserDto
public class UserGradeDto
{
[Required]
public string IdentityCard { get; set; }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment