This project is read-only.

SQL Server Database setup script errors

Mar 22, 2011 at 8:21 PM


It looks like the script that sets up the database, in case you are not using SQLEXPRESS as your engine, is incorrect. It sets up all table names in singular, where the application sample code expects all the table names to be in plural.

The script also starts with a whole lot of DROPs, that generate errors of course if you start with an empty database. Can I suggest that there are IF EXISTS put around that?



Mar 31, 2011 at 7:35 AM


If you are using SQL Server then you can add the following to the end of your entities class to resolve the use of singular table names created by the SQL script

Protected Overrides Sub OnModelCreating(ByVal modelBuilder As ModelBuilder)
        modelBuilder.Conventions.Remove(Of PluralizingTableNameConvention)()

           End Sub


This is in VB but it is very similar in C#

Apr 7, 2011 at 1:59 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.