Project creates a new DB - is this intentional?
jonathanmcnamee opened this issue · 1 comments
jonathanmcnamee commented
Hi,
Just trying to get this set up - it works fine, but it creates a new Users collection - I want this inside existing db. Is there any way to configure this?
dlmelendez commented
Yes, make sure you are using version 1.3 or higher, following the sample code, the database name is in the web.config https://github.com/dlmelendez/identitydocumentdb/blob/master/sample/samplemvc/Web.config
<add key="IdDocDb_Database" value="yourDbNameHere" />
The collection names for users and roles can be over ridden in the IdentityContext constructor in https://github.com/dlmelendez/identitydocumentdb/blob/master/sample/samplemvc/Models/IdentityModels.cs
public class ApplicationDbContext : IdentityCloudContext<ApplicationUser>
{
public ApplicationDbContext()
: base("existingcollectionname", "existingcollectionname")
{
}
This should get you going.
-Dave