Basit Nisar

Basit Nisar

  • 1.7k
  • 84
  • 11.1k

Facing error while getting value in property

Mar 6 2023 4:49 PM

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)