I mainly use the Entity Framework Code First method. The code I wrote works. However, I cannot find the newly created database in SQL Server Management Studio. Where is it? Which IDE should be used to view the newly created database and tables. I ran the following code without any problems: IsoLocationContext db = new IsoLocationContext ();
Address address = new Address(); address.TrackingNumber = "123"; db.Addresses.Add(address); db.SaveChanges();
However, I cannot find the database and tables. I tried updating the list of databases.
Then I added the following line to make sure that the data really goes into the database.
IList<Address> addresses = db.Addresses.ToList();
The handling above also worked. I also stopped and started the server and rebooted the whole machine. Just to make sure that the data is not stored in memory. Everything worked as expected. I also ran Profiler against the server during application startup, and I did not see any entries in Trace.
Please tell me what I am missing. It drives me crazy.
I also use the SQL Server 2008 R2 developer / client version.
Richard
source share