Beispiel #1
0
        public Student GetStudentDetails2(Guid studentId)
        {
            Guard.AgainstNullOrEmptyGuid(studentId, nameof(studentId));
            var student = this.dbContextLocator.Get <SchoolDbContext>().Students.SingleOrDefault(s => s.Id == studentId);

            return(student);
        }
Beispiel #2
0
        public Student GetStudentDetails(Guid studentId)
        {
            Guard.AgainstNullOrEmptyGuid(studentId, nameof(studentId));
            var student = this.repositoryLocator.GetRepository <Student>().Get().SingleOrDefault(s => s.Id == studentId);

            return(student);
        }