Srik91
Srik91

Reputation: 79

Npgsql + Entity Framework + Edmx with column type bit

I have been using Npgsql with Entity Framework + .net, while using column type as bit in the ssdl part of edmx file, its throwing an error like "The type bit is not a primitive type" .

Can anyone tell me how to use bit type with edmx file.

Thanks.

Upvotes: 2

Views: 645

Answers (2)

Atakan Savaş
Atakan Savaş

Reputation: 185

Did you use bit for boolean types? If so, you need to change your bit type to bool in your database.

If not, you need to use smallint in Entity Model.

Upvotes: 1

Lee337
Lee337

Reputation: 45

It could be the database does not support a certain datatype you want to store.

Upvotes: 0

Related Questions