I created database with ef code first.
I copied the 2 files that ef created to the project folder
DAL.UsersDb.mdf
and DAL.UsersDb_log.ldf
Now I want to tell the project to use the new location.
I added them to config
file but its not working
<add name="UsersDb"
connectionString="Data Source=(LocalDB)\v11.0;
initial catalog=UsersDb;
AttachDBFilename=|C:\Users\HOME\Desktop\MyProject|\DAL.Funcs+DataBase.mdf";
integrated security=True; MultipleActiveResultSets=True; App=EntityFramework"
providerName="System.Data.SqlClient" />
I got the following Exception:
Cannot open database \"DAL.UsersDb\" requested by the login. The login failed.\r\nLogin failed for user 'HOME\598'.
public class UsersDb : DbContext
{
public DbSet<BE.User> users { get; set; }
}