Can someone please it explain this to me? I have this stored proc:
ALTER proc [dbo].[Invoice_GetHomePageInvoices] (
@AreaIdList varchar(max)
, @FinancialYearStartDate datetime = null
, @FinancialYearEndDate datetime = null
) as
In code I'm trying to call it like this:
var areasString = new SqlParameter("AreaIdList", "1,2");
var startDate = new SqlParameter("FinancialYearStartDate", financialYear.StartDate);
var endDate = new SqlParameter("FinancialYearEndDate", financialYear.EndDate);
return _db.Database.SqlQuery<HomePageInvoice>("Invoice_GetHomePageInvoices", areasString, startDate, endDate);
I'm getting this error:
Procedure or function 'Invoice_GetHomePageInvoices' expects parameter '@AreaIdList', which was not supplied.
Say what? I've provided that parameter. Can someone please give me some insight into how to fix?