Dotnetcore and Mongos

Does anyone have any experience with connecting a dotnetcore container to a sharded mongo cluster using a mongos container? Shouldn’t bridge mode allow both containers to communicate? Wouldn’t then all I need to do is point the connection string in the dotnetcore container to localhost:27018?