C# 首先为存储过程数据库编写脚本,包括只读参数
为什么READONLY参数不是通过数据库第一次EF迁移生成的 我有一个具有以下签名的存储过程:C# 首先为存储过程数据库编写脚本,包括只读参数,c#,.net,sql-server,entity-framework,visual-studio-2017,C#,.net,Sql Server,Entity Framework,Visual Studio 2017,为什么READONLY参数不是通过数据库第一次EF迁移生成的 我有一个具有以下签名的存储过程: CREATE PROCEDURE [dbo].[PWz_P_GetshowOfferings] (@showID INT = NULL, @SegmentID INT = NULL, @SegmentKey VARCHAR(40) = NULL, @ChannelID INT, @ChannelKey VARCHAR(40) = NULL, @
CREATE PROCEDURE [dbo].[PWz_P_GetshowOfferings]
(@showID INT = NULL,
@SegmentID INT = NULL,
@SegmentKey VARCHAR(40) = NULL,
@ChannelID INT,
@ChannelKey VARCHAR(40) = NULL,
@SalesRegionID INT,
@ReturnExpiredOfferings BIT,
@AccountID INT = NULL,
@AccountFilterPairs PWz_TT_KeyValuePair READONLY)
在上下文中生成了以下内容:
public virtual ObjectResult<PWzPGetAvailableOfferingsResult> PWz_P_GetshowOfferings(Nullable<int> showID, Nullable<int> segmentID, Nullable<int> channelID, Nullable<int> salesRegionID, Nullable<bool> returnExpiredOfferings, Nullable<int> accountID)
{
var showIDParameter = showID.HasValue ?
new ObjectParameter("showID", showID) :
new ObjectParameter("showID", typeof(int));
var segmentIDParameter = segmentID.HasValue ?
new ObjectParameter("SegmentID", segmentID) :
new ObjectParameter("SegmentID", typeof(int));
var channelIDParameter = channelID.HasValue ?
new ObjectParameter("ChannelID", channelID) :
new ObjectParameter("ChannelID", typeof(int));
var salesRegionIDParameter = salesRegionID.HasValue ?
new ObjectParameter("SalesRegionID", salesRegionID) :
new ObjectParameter("SalesRegionID", typeof(int));
var returnExpiredOfferingsParameter = returnExpiredOfferings.HasValue ?
new ObjectParameter("ReturnExpiredOfferings", returnExpiredOfferings) :
new ObjectParameter("ReturnExpiredOfferings", typeof(bool));
var accountIDParameter = accountID.HasValue ?
new ObjectParameter("AccountID", accountID) :
new ObjectParameter("AccountID", typeof(int));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<PWzPGetAvailableOfferingsResult>("PWz_P_GetshowOfferings", showIDParameter, segmentIDParameter, channelIDParameter, salesRegionIDParameter, returnExpiredOfferingsParameter, accountIDParameter);
}
@AccountFilterPairs PWz_TT_KeyValuePair READONLY