0

I have downloaded a copy of the sample MVC code for DocumentDB.AspNet.Identity and provided the link and key to my DocumentDB database. The program runs fine but creates a "Users" collection in the database. I can't quite see where it is doing this as I want it to use my existing collection and not create a new one which incurs extra costs.

You can view the source code through the following link: https://github.com/tracker086/DocumentDB.AspNet.Identity/tree/master/samples/DocumentDB.AspNet.Identity.Samples.Mvc

I believe it is created on line 44 of IdentityConfig.cs inside the App_Start folder. But I cannot see where it is declaring what collection it will use. From other DocumentDb projects I have seen there is usually code that checks if a collection existis and if not create it.

Thank you.

psycho
  • 1,539
  • 4
  • 20
  • 36

1 Answers1

0

In UserStore.cs it does look like the last parameter of the constructor is the collectionid. I also see that the code checks for the existence of the collection. Have you run the sample and does it work? I see from the test code that UserStore is being constructed with a provided collectionid.

src/Tests/Tests/CustomUserPropertiesTests.cs