First off, thanks for the great work. It's invaluable, but I found one problem in using GUID columns.
Given a table with a GUID as the column.
CREATE TABLE [Account] (
"AccountId" guid NOT NULL,
"IdNumber" integer PRIMARY KEY AUTOINCREMENT NOT NULL,
"Slug" nvarchar(255) NOT NULL COLLATE NOCASE,
"Title" nvarchar(255) NOT NULL COLLATE NOCASE,
"Description" nvarchar(1024) COLLATE NOCASE,
"Approved" bit NOT NULL,
"Deleted" bit NOT NULL,
"CreateTimeUtc" datetime NOT NULL,
"UpdateTimeUtc" datetime NOT NULL,
"UpdateUser" nvarchar(255) NOT NULL COLLATE NOCASE
)
Creating a dataset from the table, the dataset identifies the "AccountId" correctly column as a GUID.
Then, either configuring the default dataset query, or adding a new query with a parameter:
SELECT [AccountId], [IdNumber], [Slug], [Title], [Description], [Approved], [Deleted], [CreateTimeUtc], [UpdateTimeUtc], [UpdateUser] FROM [Account]
WHERE (@AccountId = [AccountId])
Then, the Dataset.Designer.cs generated contains an invalid type (actually two type lines are generate, both incorrect.
param.ParameterName = "@AccountId";
param.DbType = global::System.Data.DbType.Object;
param.DbType = global::System.Data.DbType.Currency;
Changing the generated code manually such that the correct type is generated, resolves the issue.
param.ParameterName = "@AccountId";
param.DbType = global::System.Data.DbType.Guid;
If the default generated code is used, then an exception is thrown:
{"Unable to cast object of type 'System.Guid' to type 'System.IConvertible'."}