The modes are taught as c to c is ionian, d to d (following the c scale) is d dorian but check it out...
If the guitar player is playing dminor and you're playing defgabcd (d dorian) on your bass, that is what gives the mode it's "character", the chord, not the notes. If Mr. guitar player stops playing, and you are still playing those notes, you are now playing plain old c major . Many people here disagree, and say that it is where the whole and half steps fall, but those notes (defgabcd) by themselves in whatever order BY THEMSELVES are still a c scale. If Mr. guitar player is playing E minor, and you are playing the notes of a c scale (let's say efgabcde), you are playing e phrygian. If he stops, guess what, plain old c scale again.