You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
=== from thread "http://ADO.NET Entity Relationship with Stored Procedures" [meubanks] ===
I imported a few Stored Procedures into an http://ADO.NET Entity Modal that insert
data but it does not seem to be committing to the database. What am i
missing here:
FbDb db = new FbDb\(\);
db\.ADDUSER\(UserName\.Text, Password\.Text, Email\.Text\);
db\.ADDSITELOGIN\(UserName\.Text, 123\);
db\.SaveChanges\(\);
These store procedures work fine when executed using my DBManager.
1. Create a stored procedure in any Firebird database.
2. Have the SP insert values into your database using a couple of parameters you pass to your SP.
3. The prototype would look something like this: Execute Procedure MySP(value1, value2);
4. From a web project in Visual Studio 2010 add a "New Item..." to your project. Select "Data" from "Installed Templates" and choose "http://ADO.NET Entity Data Model"
5. On the Data Model work area right click in the white area and select "Update Model from Database..."
6. From the "Update Wizard" dialog box "Add" tab, select "Stored Procedures" and select the stored procedure created in steps 1 & 2 and press Finished
7. Click "View" then "Other Windows" then "Entity Data Model Browser"
8. In the "Model Browser" tree, select "Stored Procedures" under your database .Store branch (See Capture 1)
9. Right Click on your stored procedure and select "Add Function Import...."
10. None of the options in the "Returns a Collection of" or "Get Column Information" sections works but that is another issue...
11. Click OK
12. In your code create an instance of you entity modal object.
13. Notice that the modal object has a method for you stored procedure with the input parameters. At run-time the method executes successfully but the database remains unchanged. I did not make any changes to the modal's underlying code.
The text was updated successfully, but these errors were encountered:
Submitted by: @cincuranet
=== from thread "http://ADO.NET Entity Relationship with Stored Procedures" [meubanks] ===
I imported a few Stored Procedures into an http://ADO.NET Entity Modal that insert
data but it does not seem to be committing to the database. What am i
missing here:
These store procedures work fine when executed using my DBManager.
1. Create a stored procedure in any Firebird database.
2. Have the SP insert values into your database using a couple of parameters you pass to your SP.
3. The prototype would look something like this: Execute Procedure MySP(value1, value2);
4. From a web project in Visual Studio 2010 add a "New Item..." to your project. Select "Data" from "Installed Templates" and choose "http://ADO.NET Entity Data Model"
5. On the Data Model work area right click in the white area and select "Update Model from Database..."
6. From the "Update Wizard" dialog box "Add" tab, select "Stored Procedures" and select the stored procedure created in steps 1 & 2 and press Finished
7. Click "View" then "Other Windows" then "Entity Data Model Browser"
8. In the "Model Browser" tree, select "Stored Procedures" under your database .Store branch (See Capture 1)
9. Right Click on your stored procedure and select "Add Function Import...."
10. None of the options in the "Returns a Collection of" or "Get Column Information" sections works but that is another issue...
11. Click OK
12. In your code create an instance of you entity modal object.
13. Notice that the modal object has a method for you stored procedure with the input parameters. At run-time the method executes successfully but the database remains unchanged. I did not make any changes to the modal's underlying code.
The text was updated successfully, but these errors were encountered: