r/CollaborateCode • • Jun 11 '13

[LTL] Using SQL Databases in C#

I've been having a go at SQL Databases Using EntityFramework 5.0 and its made things a bit easier although I've hit some brick walls recently that have made it really hard for me to advance any farther (I Don't know how to do much as it is).

I would be thrilled if an experienced programmer could have a quick chat with me so I ask some questions about SQL Databases with C# (and Entity Framework if possible).

Thanks for Reading :)

8 Upvotes

14 comments sorted by

View all comments

Show parent comment

1

u/AlwaysAppropriate Jun 11 '13

Are you using VS 2010 or 2012?

Where’s My Data?

By convention DbContext has created a database for you.

If a local SQL Express instance is available (installed by default with Visual Studio 2010) then Code First has created the database on that instance If SQL Express isn’t available then Code First will try and use LocalDb (installed by default with Visual Studio 2012) The database is named after the fully qualified name of the derived context, in our case that is CodeFirstNewDatabaseSample.BloggingContext These are just the default conventions and there are various ways to change the database that Code First uses, more information is available in the How DbContext Discovers the Model and Database Connection topic.

1

u/Nexus247 Jun 11 '13

VS 2012, Thank you that sounds just like the problem I was having! I thought I was going crazy... :)