I combined the solution of nop commerce with nop commerce multi store. After merging the solutions I was making sure NOP.Data.Tests pass but to my dismay a number of tests are failing and almost all of them are failing giving me the same error "A foreign key value cannot be inserted because a corresponding primary key value doesn't exist. [Fk_Customer_Store_StoreId]". I didn't know which database was being accessed so after a little investigation found out that a temporary compact edition database is being created when a test is run. The database gets its schema from Nop.Data/Mapping folder. So I made the necessary changes to the CustomerMap.cs file (added store id as a property and added a foreign key mapping customer storeId to a Store's Id). Even after making those changes I am still not able to figure out why I am getting that error. A little help would be appreciated. Thanks.