From e8af6f3bf346482dfed1884a7d17aefdfc9e0189 Mon Sep 17 00:00:00 2001 From: Adrian Limon Date: Wed, 20 Sep 2017 13:46:17 -0700 Subject: [PATCH] added data transfer objects --- ContosoUniversity.Data/DTO/CourseAssignmentsDTO.cs | 8 ++++++++ ContosoUniversity.Data/DTO/CourseDTO.cs | 11 +++++++++++ ContosoUniversity.Data/DTO/DepartmentDTO.cs | 13 +++++++++++++ ContosoUniversity.Data/DTO/EnrollmentDTO.cs | 12 ++++++++++++ ContosoUniversity.Data/DTO/InstructorDTO.cs | 12 ++++++++++++ ContosoUniversity.Data/DTO/OfficeAssignmentDTO.cs | 9 +++++++++ ContosoUniversity.Data/DTO/StudentDTO.cs | 12 ++++++++++++ 7 files changed, 77 insertions(+) create mode 100644 ContosoUniversity.Data/DTO/CourseAssignmentsDTO.cs create mode 100644 ContosoUniversity.Data/DTO/CourseDTO.cs create mode 100644 ContosoUniversity.Data/DTO/DepartmentDTO.cs create mode 100644 ContosoUniversity.Data/DTO/EnrollmentDTO.cs create mode 100644 ContosoUniversity.Data/DTO/InstructorDTO.cs create mode 100644 ContosoUniversity.Data/DTO/OfficeAssignmentDTO.cs create mode 100644 ContosoUniversity.Data/DTO/StudentDTO.cs diff --git a/ContosoUniversity.Data/DTO/CourseAssignmentsDTO.cs b/ContosoUniversity.Data/DTO/CourseAssignmentsDTO.cs new file mode 100644 index 0000000..2ed102c --- /dev/null +++ b/ContosoUniversity.Data/DTO/CourseAssignmentsDTO.cs @@ -0,0 +1,8 @@ +namespace ContosoUniversity.Data.DTO +{ + public class CourseAssignmentsDTO + { + public int InstructorID { get; set; } + public int CourseID { get; set; } + } +} diff --git a/ContosoUniversity.Data/DTO/CourseDTO.cs b/ContosoUniversity.Data/DTO/CourseDTO.cs new file mode 100644 index 0000000..548a528 --- /dev/null +++ b/ContosoUniversity.Data/DTO/CourseDTO.cs @@ -0,0 +1,11 @@ +namespace ContosoUniversity.Data.DTO +{ + public class CourseDTO + { + public int ID { get; set; } + public int CourseNumber { get; set; } + public string Title { get; set; } + public int Credits { get; set; } + public int DepartmentID { get; set; } + } +} diff --git a/ContosoUniversity.Data/DTO/DepartmentDTO.cs b/ContosoUniversity.Data/DTO/DepartmentDTO.cs new file mode 100644 index 0000000..120c625 --- /dev/null +++ b/ContosoUniversity.Data/DTO/DepartmentDTO.cs @@ -0,0 +1,13 @@ +using System; + +namespace ContosoUniversity.Data.DTO +{ + public class DepartmentDTO + { + public int ID { get; set; } + public int InstructorID { get; set; } + public string Name { get; set; } + public decimal Budget { get; set; } + public DateTime StartDate { get; set; } + } +} diff --git a/ContosoUniversity.Data/DTO/EnrollmentDTO.cs b/ContosoUniversity.Data/DTO/EnrollmentDTO.cs new file mode 100644 index 0000000..bd8654b --- /dev/null +++ b/ContosoUniversity.Data/DTO/EnrollmentDTO.cs @@ -0,0 +1,12 @@ +using ContosoUniversity.Data.Enums; + +namespace ContosoUniversity.Data.DTO +{ + public class EnrollmentDTO + { + public int ID { get; set; } + public int CourseID { get; set; } + public int StudentID { get; set; } + public Grade? Grade { get; set; } + } +} diff --git a/ContosoUniversity.Data/DTO/InstructorDTO.cs b/ContosoUniversity.Data/DTO/InstructorDTO.cs new file mode 100644 index 0000000..3bad9a1 --- /dev/null +++ b/ContosoUniversity.Data/DTO/InstructorDTO.cs @@ -0,0 +1,12 @@ +using System; + +namespace ContosoUniversity.Data.DTO +{ + public class InstructorDTO + { + public int ID { get; set; } + public string FirstMidName { get; set; } + public string LastName { get; set; } + public DateTime HireDate { get; set; } + } +} diff --git a/ContosoUniversity.Data/DTO/OfficeAssignmentDTO.cs b/ContosoUniversity.Data/DTO/OfficeAssignmentDTO.cs new file mode 100644 index 0000000..d60330b --- /dev/null +++ b/ContosoUniversity.Data/DTO/OfficeAssignmentDTO.cs @@ -0,0 +1,9 @@ +namespace ContosoUniversity.Data.DTO +{ + public class OfficeAssignmentDTO + { + public int ID { get; set; } + public int InstructorID { get; set; } + public string Location { get; set; } + } +} diff --git a/ContosoUniversity.Data/DTO/StudentDTO.cs b/ContosoUniversity.Data/DTO/StudentDTO.cs new file mode 100644 index 0000000..dd53808 --- /dev/null +++ b/ContosoUniversity.Data/DTO/StudentDTO.cs @@ -0,0 +1,12 @@ +using System; + +namespace ContosoUniversity.Data.DTO +{ + public class StudentDTO + { + public int ID { get; set; } + public string FirstMidName { get; set; } + public string LastName { get; set; } + public DateTime EnrollmentDate { get; set; } + } +}