This question is probably something simple because of my unfamiliarity with Entity Framework. I am debugging someone else's code.
Dim quoteSql As String = $" SELECT TOP 1 * FROM HomeDWQuote WHERE RecID = @QuoteID ORDER BY RecID DESC"
Using db As New Data.Auto.CRSContext()
Dim dwQuotes = db.HomeDWQuotes.FromSqlRaw(quoteSql, {New SqlParameter("@QuoteID", quoteId)}).ToList()
Is giving me this error:
(0x80131904): The parameterized query '
(@QuoteID nvarchar(4000)) SELECT TOP 1 * FROM HomeDWQuote WHERE '
expects the parameter '@QuoteID', which was not supplied.
This question has been asked several other times but this question is different because it is using FromSqlRaw() which I am not familiar with.
User contributions licensed under CC BY-SA 3.0