MikaelEliasson / EntityFramework.Utilities

Provides extensions for EntityFramework that doesn't exist out of the box like delete and update by query and bulk inserts
443 stars 175 forks source link

SqlParameter provided for every provider #75

Open zabulus opened 8 years ago

zabulus commented 8 years ago

I develop custom IQueryProvider for Firebird .NET. I've added all implementation I'd needed for Update queries. After running queries, exception System.InvalidCastException : The parameter passed was not a FbParameter. from FB.NET occured. The issue cause is here: https://github.com/MikaelEliasson/EntityFramework.Utilities/blob/b01ec62d842bc36f9f3eb9dbe2cc8c05d2f45aa6/EntityFramework.Utilities/EntityFramework.Utilities/EFBatchOperation.cs#L237 The library provides SqlParameter, no matter what provider is running now. My suggestion is to add DbParameter factory to IQueryProvider interface. I can provide PR for my suggestion if it is acceptable.