Linq to Entity(postgresql) System.InvalidCastExce about uuid
Posted: Mon 08 Mar 2010 07:15
This is my sql table schema for postgresql
CREATE TABLE employee
(
id uuid PRIMARY KEY,
emp_no varchar NOT NULL ,
emp_password varchar NOT NULL
);
and this is my Code with VB 2008
Dim testGuid As Guid = Guid.NewGuid
Dim employee = From emp In db.Employees _
Where emp.Id = testGuid _
Select emp
and this is my error
'System.InvalidCastException' 發生於 Devart.Data.PostgreSql.Linq.dll
無法將型別 'Devart.Data.Linq.Provider.ProviderType' 的物件轉換為型別 'Devart.Data.PostgreSql.Linq.Provider.PgSqlProviderType'。
when we use uuid to select will have this error
CREATE TABLE employee
(
id uuid PRIMARY KEY,
emp_no varchar NOT NULL ,
emp_password varchar NOT NULL
);
and this is my Code with VB 2008
Dim testGuid As Guid = Guid.NewGuid
Dim employee = From emp In db.Employees _
Where emp.Id = testGuid _
Select emp
and this is my error
'System.InvalidCastException' 發生於 Devart.Data.PostgreSql.Linq.dll
無法將型別 'Devart.Data.Linq.Provider.ProviderType' 的物件轉換為型別 'Devart.Data.PostgreSql.Linq.Provider.PgSqlProviderType'。
when we use uuid to select will have this error