I have a stored procedure that I am calling through LINQ and EF, it is returning a count, and the Stored procedure is tried and tested.
It requires 10 parameters.
These are the parameters the stored procedure takes:
@StartDate DATETIME,
@EndDate DATETIME,
@Wards CodeTable READONLY,
@Clinicians CodeTable READONLY,
@Sites CodeTable READONLY,
@Specialities CodeTable READONLY,
@excludeCurrentInpatients BIT,
@DemoMode BIT,
@SortOrder Int,
@IsCurrent bit
And this is the way I call it in LINQ:
public int Inpatient_Count(DateTime? startDate, DateTime? endDate, List<string> wards, List<string> clinicians, List<string> sites, List<string> specialities, bool excludeCurrentInpatients, bool demoMode, int sortOrder, bool IsCurrent)
{
using (DBName context = new DBName())
{
int total = context.SPROC_Name(startDate, endDate, wards, clinicians, sites, specialities, excludeCurrentInpatients, demoMode, sortOrder, IsCurrent);
return total;
}
}
I keep getting the error:
No Overload method for 'SPROCName' takes 10 arguments
but I am passing ten parameters in. Any help would be greatly appreciated.