public static Student ToStudent(this StudentDto s) { return(new Student { Id = s.Id, Name = s.Name, Course = s.Course, Age = s.Age, Email = s.Email, PhotoUrl = s.PhotoUrl, Profile = new Profile { Grade = s.Grade }, Tickets = s.Tickets.Select(t => t.ToTicket()).ToList(), StudentModules = s.StudentModules.Select(m => m.ToStudentModule()).ToList() }); }
public static string ToPrintable(this StudentDto s) { return($"Dto Id:{s.Id} Name:{s.Name} Course:{s.Course} Age:{s.Age} Email: {s.Email} Grade: {s.Grade} "); }