Frage

I have created a Devart linqconnect model called as shopping context and using mysql as the database.I am using trial version of 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:

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?

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 :

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.

War es hilfreich?

Lösung

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. 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. 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). 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 .

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top