ravendb/ravendb — pull request #500 by jjchiw (2013-01-28 23:40:27+00:00)
Title: Creating the index Raven/DocumentsByEntityName when executing EnsureDatabaseExist. Fixing bug with the EnsureDatabaseExistAsync and CreateDatabaseAsync the parameters of the AsyncServerClient.CreateRequest were in the wrong order

When executing EnsureDatabaseExist the index Raven/DocumentsByEntityName
were not created. And that caused and error in the studio. I had to stop
and start the server and the index will be created automatically. So I
added the index in the EnsureDatabaseExist extension method.

Another thing
ServerClient and AsyncServerClient have the method CreateRequest but the
signature are different in the order of the parameters
(requestUrl,method)

So the EnsureDatabaseExistsAsync and CreateDatabaseAsync methods in
MultiTenancyExtensions just didn't work just changed the order of the
parameters