2
Answers

Facing error while getting value in property

Basit Nisar

Basit Nisar

1y
522
1

LastModifiedDate= db.Database.SqlQuery<DateTime>("SELECT [dbo].[fnGetLastModifiedDate]( @TimeCardID,@InvoiceSourceTypeID)",
new SqlParameter("@TimeCardID", timecard.TimeCardID),
new SqlParameter("@InvoiceSourceTypeID", 1)
).FirstOrDefault(),

This function is returning DateTime value which i am adding in entity frame work code ,

but when running the solution it gives error

["LINQ to Entities does not recognize the method "]

Please suggest

Answers (2)