public async Task<Person> CreatePerson(string firstName, string surname, DateTime dob, string email, string mobile) { var person = new Person( firstName: firstName, surname: surname, dob: dob, email: email, mobile: mobile ); var context = new DataAccess.Models.CourseFantasticDbContext(); var dbPerson = new DataAccess.Models.Person() { FirstName = person.FirstName, Surname = person.Surname, DoB = person.Dob, Email = person.Email }; context.People.Add(dbPerson); await context.SaveChangesAsync(); person = await _repoPerson.Add(person); dbPerson.Identity = person.Identity; context.SaveChangesAsync(); return person; }
public Student(Person person, string studentID) { Person = person; StudentID = studentID; _attendance = new Dictionary<string, List<Attendance>>(); }
public Teacher(Person person, string employeeId, List<InstructorAssignment> subjects, List<InstructorAssignment> subjectAssignments) :this(person, employeeId, subjectAssignments) { Assignments = subjects; }
public Teacher(Person person, string employeeId, List<InstructorAssignment> subjectAssignments) { Person = person; EmployeeId = employeeId; Assignments = subjectAssignments; }
public Timetable(Person person, List<TimeTableItem> items) { Person = person; Items = items; }