ADO.NET Entity Relationship with Stored Procedures --------------------------------------------------
Key: DNET-424 URL: http://tracker.firebirdsql.org/browse/DNET-424 Project: .NET Data provider Issue Type: Bug Components: Entity Framework support Affects Versions: 2.6.5 Environment: Visual Studio 2010, Firebird 2.5, and ADO.NET Provider 2.6.5 Reporter: Jiri Cincura Assignee: Jiri Cincura === from thread "ADO.NET Entity Relationship with Stored Procedures" [meubanks] === I imported a few Stored Procedures into an 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 "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. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------------ Better than sec? Nothing is better than sec when it comes to monitoring Big Data applications. Try Boundary one-second resolution app monitoring today. Free. http://p.sf.net/sfu/Boundary-dev2dev _______________________________________________ Firebird-net-provider mailing list Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider