You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Program fails at Microsoft.Data.SqlClient.SqlException: 'Must declare the scalar variable "@InvoiceTemplateId".
Statement(s) could not be prepared.' The exception throws if Select statement contains field with another database column name as defined by model.
Program not throws the exception without Select statement which specified concrete columns.
UPDATE [InvoiceTemplateSettings]
SET [TemplateName] = @TemplateName
WHERE ([InvoiceTemplateId] = @InvoiceTemplateId)
WITH PARAMETERS (zmenená šablónka)
Library name and version
Description
Program fails at Microsoft.Data.SqlClient.SqlException: 'Must declare the scalar variable "@InvoiceTemplateId".
Statement(s) could not be prepared.' The exception throws if Select statement contains field with another database column name as defined by model.
Program not throws the exception without Select statement which specified concrete columns.
Steps To Reproduce
And the console show
Model is
Model builder is
SQL
If I replace the line with the query without
.Select(columns)
statement:the code runs success without exception.
Expected behavior
I think this is a bug because I must use the name of database column, not column of model. I would expect to use model column name.
The text was updated successfully, but these errors were encountered: