Home  /  Questions  /  Question

50   50
Oct 27, 2013

Spark Domain Generator class SqlMap map["bit"] = "boolean";


I generated the project and then received an error.

The type or namespace name 'boolean' could not be found (areyou missing a using directive or an assembly reference?) Path\_Spark\Domain.cs Project.Domain.

I know “bool” is an alias of System.Boolean. http://msdn.microsoft.com/en-us/library/c8f5xwh7.aspx

Unless I am missing something, I would recommend changingthe SQL map to “bool” in DomainGenerator.tt and RestGenerator.tt files.

staticclass SqlMap


    static readonly Dictionary<string,string> map = new Dictionary<string, string>();

    static SqlMap()


        map["bigint"] ="long";

        map["binary"] ="byte[]";

        map["bit"] = "bool”;

After updating the SqlMap and regenerating, all was good.



508   99.9
Oct 27, 2013

You are absolutely correct,
In fact, the error was detected a few weeks ago and a fix was made available to the downloads.
Unfortunately it seems that you downloaded just before the correction. Sorry about that. 

Jack Poorte
 1 comment
I am having the same issue with the SQL Xml DataType. There is no Xml type, but rather SqlXml Type. Any suggestions where I may be going wrong? --- Jonathan Pickford  Apr 19, 2014