简体   繁体   English

无法在devart linqconnect中加载存储过程

[英]cannot load stored procedure in devart linqconnect

I have created a Devart linqconnect model called as shopping context and using mysql as the database.I am using trial version of Linqconnect. 我创建了一个称为购物上下文的Devart linqconnect模型 ,并使用mysql作为数据库。我正在使用Linqconnect的试用版。

I have created a stored procedure clothingItems in the database , when i try to add the stored procedure to the diagram it gives me warning that: 我在数据库中创建了一个存储过程ClothingItems,当我尝试将存储过程添加到图中时,它向我发出警告:

In order to obtain metadata of procedure result set it is necessary to execute the procedure, which may cause database damage. 为了获得过程结果集的元数据,必须执行过程,这可能会导致数据库损坏。 Procedure name: shopping.clothing_items Do you wish to obtain metadata of procedure result set? 过程名称:shopping.clothing_items您是否希望获取过程结果集的元数据?

but after in the code behind file, I see that it is appearing in the intellisense menu clothingItemResults and ClothingItem method as ShoppingDatcontext.ClothingItem and and duplicate methods (I think !) like : 但是在文件后面的代码中,我看到它以“ ShoppingDatcontext.ClothingItem”和intellisense菜单上的ClothingItemResults和ClothingItem方法出现,并且还有重复的方法(我认为是!),例如:

void ClothingItem1(),       
void ClothingItem2();         
void ClothingItem3(); 

and also it is not getting added in the diagram. 并且它没有被添加到图中。

How can i add stored procedure without damaging the database and how to insert it in the diagram that it would display it. 我如何才能在不损坏数据库的情况下添加存储过程,以及如何将其插入显示它的图表中。 please Help. 请帮忙。

When adding procedures to the model, Entity Developer tries to execute a stored procedure to determine the return type of the method which corresponds to this stored procedure. 在将过程添加到模型时,Entity Developer尝试执行存储过程以确定与该存储过程相对应的方法的返回类型。 So, you see the warning about obtaining metadata of procedure result set. 因此,您会看到有关获取过程结果集元数据的警告。 In case, you choose OK the stored procedure will be executed and the return type will be determined. 如果您选择“确定”,则将执行存储过程并确定返回类型。 Whether any data or database structures may be damaged, depends solely on what the procedure does. 是否可能损坏任何数据或数据库结构,仅取决于该过程执行的操作。 If you are sure this procedure is safe, you can allow Entity Developer to run it and get the metadata. 如果确定此过程是安全的,则可以允许Entity Developer运行它并获取元数据。 Otherwise, you can configure the procedure result set manually. 否则,您可以手动配置过程结果集。

Duplicate methods are generated, because you have added this procedure several times. 由于您多次添加了此过程,因此生成了重复的方法。 Each time you add a procedure to your model (even the same) the new method is generated for it. 每次向模型添加过程(甚至相同)时,都会为其生成新方法。 All generated methods for stored procedures are available in the Model Explorer->Methods and in the generated code (*.Designer.cs). 在Model Explorer-> Methods和生成的代码(* .Designer.cs)中都可以找到所有为存储过程生成的方法。 To see the name of the corresponding stored procedure, parameters and the result type, please double-click the necessary method in Model Explorer->Methods or refer to the code. 要查看相应存储过程的名称,参数和结果类型,请在“模型资源管理器”->“方法”中双击必要的方法,或参考代码。

Methods are not shown on the diagram layout, they are available only in Model Explorer->Methods and in the code. 方法未在图布局上显示,它们仅在“模型资源管理器”->“方法”和代码中可用。 Diagram contains classes, complex types and enumerated types with their properties and relations between them. 图包含类,复杂类型和枚举类型及其属性和它们之间的关系。

For more information please refer here . 有关更多信息,请参阅此处

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM