public async Task <IDataResult <Student> > GetStudentWithAddressByIdAsync(int studentId) { var student = await _studentDal.GetStudentWithAddressByIdAsync(s => s.Id == studentId); if (student == null) { return(new ErrorDataResult <Student>(new Student { Id = studentId }, HttpStatusCode.NotFound)); } return(new SuccessfulDataResult <Student>(student, HttpStatusCode.OK)); }