The DbSet.Find() method searches only for PRIMARY KEY matches, it will not search all/any properties on an entity.
I think you are looking for something like this:
ViewStudentDetail.Student = DbAccess.StudentDetails.FirstOrDefault(student => student.Username == username);
If not, please provide more of your source code in your question. Specifically, please include the generated entity classes.