当我使用 linq 将两个变量值传递给存储过程时出现错误
下面是我过去如何将变量传递给 linq
Customer objCustomer = DbContext.ExecuteStoreQuery<Customer>
("exec getCustomerDetails {0}{1}", CustomerId, OrderId).AsQueryable().ToList();
下面是我的存储过程
create procedure getCustomerDetails
@CustomerId int,
@OrderId int
as
select * from customer c
where c.CustomerId = @CustomerId and c.OrderId = @OrderId
下面是我得到的错误
Message = "Must declare the scalar variable \"@p0@p1\"."
请建议
谢谢,