I have following line to connect simplemembership with my existing table.
Code: Select all
WebSecurity.InitializeDatabaseConnection("DefaultConnectionPostGres", "Contacts", "Id", "UserName", autoCreateTables: true);
This line works without a problem if I change my connection string to localsql server. But If I change my connection string to postgres server, it automatically generates a table called 'contacts', not the "Contacts".
So I changed "Contacts" to "contacts" like below line.
Code: Select all
WebSecurity.InitializeDatabaseConnection("DefaultConnectionPostGres", "contacts", "Id", "UserName", autoCreateTables: true);
Code: Select all
Devart.Data.PostgreSql.PgSqlException: column "id" does not exist
Code: Select all
CREATE TABLE "Contacts"
(
"Id" serial NOT NULL,
"UserName" character varying NOT NULL,
"Age" integer,
CONSTRAINT "PK_Contacts" PRIMARY KEY ("Id")
)
CREATE TABLE contacts
(
id serial NOT NULL,
username character varying(240) NOT NULL,
CONSTRAINT contacts_pkey PRIMARY KEY (id),
CONSTRAINT contacts_username_key UNIQUE (username)
)