Bug #77168 Entity Framework 5.0 Stored Procedure Imports gives Casting error
Submitted: 27 May 2015 9:54 Modified: 27 Jun 2015 13:19
Reporter: Ammad Javaid Email Updates:
Status: No Feedback Impact on me:
None 
Category:Connector / NET Severity:S2 (Serious)
Version:5.6.20 OS:Linux
Assigned to: Assigned Account CPU Architecture:Any
Tags: entityframework, StoredProcedures

[27 May 2015 9:54] Ammad Javaid
Description:
I have the latest connectors installed for the EF using VS2013

which ever stored procedure I import i get the following error

Unable to generate the model because of the following exception: 'System.InvalidCastException: Unable to cast object of type 'System.Boolean' to type 'System.String'.
   at System.Data.DataTableReader.GetString(Int32 ordinal)
   at Devart.Data.MySql.Entity.ai.a(Int32 A_0)
   at Devart.Common.Entity.b8.GetValue(Int32 ordinal)
   at lambda_method(Closure , Shaper )
   at System.Data.Entity.Core.Common.Internal.Materialization.RecordState.GatherData(Shaper shaper)
   at lambda_method(Closure , Shaper )
   at System.Data.Entity.Core.Common.Internal.Materialization.Coordinator`1.ReadNextElement(Shaper shaper)
   at System.Data.Entity.Core.Common.Internal.Materialization.Shaper`1.SimpleEnumerator.MoveNext()
   at System.Data.Entity.Core.Query.ResultAssembly.BridgeDataReader.SetShaper(Shaper`1 shaper, CoordinatorFactory`1 coordinatorFactory, Int32 depth)
   at System.Data.Entity.Core.Query.ResultAssembly.BridgeDataReader.<>c__DisplayClass4.<.ctor>b__0()
   at System.Data.Entity.Core.Query.ResultAssembly.BridgeDataReader.EnsureInitialized()
   at System.Data.Entity.Core.Query.ResultAssembly.BridgeDataReader.Read()
   at System.Data.Entity.Core.EntityClient.EntityDataReader.Read()
   at Microsoft.Data.Entity.Design.VersioningFacade.ReverseEngineerDb.SchemaDiscovery.FunctionDetailsReader.Read()
   at Microsoft.Data.Entity.Design.VersioningFacade.ReverseEngineerDb.SchemaDiscovery.EntityStoreSchemaGeneratorDatabaseSchemaLoader.LoadFunctionDetails(IEnumerable`1 filters)
   at Microsoft.Data.Entity.Design.VersioningFacade.ReverseEngineerDb.SchemaDiscovery.EntityStoreSchemaGeneratorDatabaseSchemaLoader.LoadStoreSchemaDetails(IList`1 filters)
   at Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Engine.ModelGenerator.GetStoreSchemaDetails(StoreSchemaConnectionFactory connectionFactory)
   at Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Engine.ModelGenerator.CreateStoreModel()
   at Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Engine.ModelGenerator.GenerateModel(List`1 errors)
   at Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Engine.ModelBuilderEngine.GenerateModels(String storeModelNamespace, ModelBuilderSettings settings, List`1 errors)
   at Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Engine.ModelBuilderEngine.GenerateModel(ModelBuilderSettings settings, IVsUtils vsUtils, ModelBuilderEngineHostContext hostContext)'.
Loading metadata from the database took 00:00:07.0422075.
Generating the model took 00:01:19.1832074.

How to repeat:

Import stored procs in the EF using latest connectors available at MySql website using  VS2013
[27 May 2015 13:19] Chiranjeevi Battula
Hello Ammad Javaid,

Thank you for the bug report.
I tried to reproduce the issue at my end using Visual Studio 2013 (C#.Net), MySQL Connector/Net 6.9.6 but not seeing any issue in stored procedures importing.
Could you please provide repeatable steps for us to confirm this issue at our end.

Thanks,
Chiranjeevi.
[27 May 2015 13:20] Chiranjeevi Battula
screenshot

Attachment: 77168.PNG (image/png, text), 96.42 KiB.

[28 Jun 2015 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".