DLINQ do not puts [] in "INSERT INTO" statement fields

Hello all!

In DLINQ operation to add a new persisted object in a database, it do not put de [] qualifiers.

If the column has a blank space occurs a error.

Generated statement example:

"INSERT INTO TableName (My Field1, My Field2) VALUES (@p0, @p1)"

Thanks, and scuse my english!

Vitor




Answer this question

DLINQ do not puts [] in "INSERT INTO" statement fields

  • Karenros

    I could solve putting the [] hard coded in the column mapping:


    [Column(Name = "[My Field]")]
     

    Now it's working ok!

    Thanks

    Vitor



  • fprintf

    Nice workaround.
    I am not sure if this is the proper way to go. It would be better if DLinq does this automatically otherwise code is unnecessary cluttered (not that much though) and developer has to know which fields needs brackets.

  • DLINQ do not puts [] in "INSERT INTO" statement fields