This project is read-only.

SimpleCommerce.Models - DbType errors

Jan 7, 2011 at 5:53 AM
Edited Jan 7, 2011 at 5:55 AM

// Creating table ProductPartRecord
            SchemaBuilder.CreateTable("ProductPartRecord", table => table
                .Column("Sku", DbType.String)
                .Column("Price", DbType.Single)

Any ideas on why I would be getting the following error:

"The name DbType does not exist in the current context"


Jan 7, 2011 at 4:07 PM

You need  to add a reference to System.Data

Jan 7, 2011 at 4:36 PM


I saw you comment at 12:07am and just about same time as that I realized the same thing when I tried to do this for the second time.  On checking I noticed that the wiki documentation didn't match what was created with

codegen datamigration SimpleCommerce

I have changed the wiki documentation and updated my code. All okay now.