MySQL Forums
Forum List  »  MySQL for Visual Studio

EF6 stored proc failing in EFMySqlDataReader GetDataTypeName. No automatic type generation?
Posted by: Andrew Stollak
Date: June 12, 2017 04:37PM

I'm able to use EF6 to make a database-first model from my tables and my stored procedures, but the stored procedures all fail at GetDataTypeName, index out of range. The tables are working as expected, and their types were generated automatically and correctly. The types for my stored proc results are all present, and all empty.

I turned on the context's log and both the table access and the stored proc access are making valid SQL calls, and the database says it's returning a result.

Steps I did to recreate this error:
Create an empty ASP.NET web app.
Add the two references with NuGet for MySQL & EF6
Add a New Item
ADO.NET Entity Data Model
EF Designer from database
(set connection strings, choose a few tables and a few stored procedures, use defaults)

I double-checked the Model Browser's Function Imports to make sure they look right after clicking Get Column Information, but I don't see anywhere that they're being stored in the code.

The exception after calling the stored proc is that the index is out of range.

Am I doing something incorrectly? Am I asking too much of this database-first process? (VERY much legacy code)

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.