升级问题! (SingleOrDefault_Executing => Query_Executing) [英] Upgrade Problem! (SingleOrDefault_Executing => Query_Executing)
问题描述
亲爱的先生/女士
我已将我的lightswitch项目升级到LS2012。
之前的版本有代码......
I have upgrade my lightswitch project to LS2012.
The previous version has the code...
部分无效Products_SingleOrDefault_Executing(int?Id)
{
if (Id == -1){/ *做某事* /}
}
partial void Products_SingleOrDefault_Executing(int? Id)
{
if(Id == -1) { /* do something*/ }
}
LS2012没有SingleOrDefault_Executing事件和我使用过Query_Executing事件相反。
The LS2012 don't has SingleOrDefault_Executing event and I have used Query_Executing event instead.
问题是如何从Query_Executing事件中获取Id参数
The problem is how to get the Id parameter from Query_Executing event
partial void Query_Executing(QueryExecutingDescriptor queryDescriptor)
{
/ *如何获得Id * /
}
谢谢。
partial void Query_Executing(QueryExecutingDescriptor queryDescriptor)
{
/* how to get Id */
}
Thank You.
推荐答案
如果您有使用SingleOrDefault_Executing的V1应用程序,你升级那个应用程序,我们将把代码转发给我们,我们实际上会在正确的时间运行它。
If you had a V1 app where you were using SingleOrDefault_Executing, when you upgrade that app, we will bring that code forward and we will actually run it at the right times.
但是,即使你升级了V1 app使用此代码,我不相信该方法将出现在"编写代码"中。 。菜单 但是,代码仍然在您的源文件中。
However, even if you upgraded a V1 app with this code in it, I don't beleive the method will show up in the "Write Code" menu. However, the code will still be in your source file.
在新的V2应用程序中,或者如果您在升级之前未在V1应用程序中实现SingleOrDefault_Executing的任何代码,则该功能将不可用。
In a new V2 app, or if you didn't implement any code for SingleOrDefault_Executing in your V1 app before upgrading, the functionality will not be available.
这篇关于升级问题! (SingleOrDefault_Executing => Query_Executing)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!