Answer the question
In order to leave comments, you need to log in
LINQ to SQL and Enum?
There is the following request:
IQueryable<Header> headers = context.Headers;
IQueryable<Line> lines = context.Lines;
result = headers.Select(header => new ReportModel
{
Comment = header.Comment,
Lines = lines.Where(line => line.Header == header.ID).Select(line => new ReportLineModel
{
SomeProperty = line.SomeProperty,
Error = ErrorLine.None
})
}).ToArray();
The specified value is not an instance of type 'Edm.Int32'
Answer the question
In order to leave comments, you need to log in
'Edm.Int32'
Error = (ErrorLine)1 // то значение, которое имеет None
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question