Using LocalDB with CodeFluent Entities
With Microsoft SQL Server 2012, Microsoft has introduced a feature called LocalDB which is a new edition of SQL Express. LocalDB is created specifically for developers and it is much easier to install (no service) and manage than standard editions. Developers initiate a connection by using a special connection string. It supports AttachDbFileName property, which allows you to specify a database file location.
When connecting, the server is automatically created and started, enabling the application to use the database without complex configuration tasks. This edition uses the same sqlservr.exe as the regular SQL Express and other editions of SQL Server.
The installation of Visual Studio 2012 and 2013 includes LocalDB 2012 and you can download the SQL Express 2014 LocalDb edition directly from the MSDN.
The SqlLocalDB Utility help you to manage your LocalDb instances. The following command will list you all LocalDB versions installed on your computer:
And the existing LocalDB instances owned by the current user and all shared LocalDB instances:
To check on the status and other details about an instance, you can run:
CodeFluent Entities Build 769 introduced the support of Microsoft SQL Server 2014 and gives you the opportunity to use SQL Server LocalDB (2012 and 2014) as your persistence server of your CodeFluent Entities application.
The SQL Server Producers allows you to generate your database layer on an SQL Server LocalDB instance:
Just build your model and connect to your LocalDb instance with SQL Server Management Studio or the Visual Studio Server Explorer. You can see that a new database has been created with the named you specified in the Connection String, and populated with the tables automatically inferred from your model as well as instances:
The R&D Team