S
Steven Blair
Hi,
I have a simple LINQ to SQL query (check query 1)
http://pastebin.com/m71c9b2e8
This returns me the mapping of a table from my Database.
The problem I have is some of the columns need to be trimmed and isnull
checks.
If I was doing this in normal SQL I would simply perform the trim and
isnull on each column.
I need to do this in LINQ BUT I don't want to create a custom class
(check query 2 for an approach, but this fails with the following
exception:
Explicit construction of entity type FileProcessing.FileProfile' in
query is not allowed.)
I know I could create a new class and select a new class form the LINQ
statement and perform the checks, but this seems pointless since LINq
alreayd built the class I need to use (means if I update Database, I
don't have to change the class code.
Hope this makes sense and thanks.
Steven
I have a simple LINQ to SQL query (check query 1)
http://pastebin.com/m71c9b2e8
This returns me the mapping of a table from my Database.
The problem I have is some of the columns need to be trimmed and isnull
checks.
If I was doing this in normal SQL I would simply perform the trim and
isnull on each column.
I need to do this in LINQ BUT I don't want to create a custom class
(check query 2 for an approach, but this fails with the following
exception:
Explicit construction of entity type FileProcessing.FileProfile' in
query is not allowed.)
I know I could create a new class and select a new class form the LINQ
statement and perform the checks, but this seems pointless since LINq
alreayd built the class I need to use (means if I update Database, I
don't have to change the class code.
Hope this makes sense and thanks.
Steven