Hi, We have used EFProviderWrapp
erToolkit and developed own customized provider. The main purpose of own provider is to support connection pooling in multi-tenancy scenario. It was working fine with EF4.3 Code First model, but stopped working with EF6. I have posted my issue here: https://entityf ramework.codepl ex.com/discussi ons/442427 http://stackove rflow.com/quest ions/16355395/m ulti-tenancy-an d-connection-po ol-using-ef-6 It would be great if you can provide some guidance how to use them with EF6 and develop own provider? Or how can we achieve Connection Pooling? Regards, Hitesh
The provider model in EF6 has changed. First of all you need to use an EF6 provider. If you are using Sql Server the EF6 Sql Server provider is included in the EF6 package. Since the wrapping provider is just another provider you should read and follow [the document about rebuilding a provider for EF6](http://ent
ityframework.co deplex.com/wiki page?title=Rebu ilding%20EF%20p roviders%20for% 20EF6) and the wrapping provider should continue to work. Note that the document contains a section about wrapping providers in EF6. In addition in EF6 we introduced [dependency injection and code-based configuration]( https://entityf ramework.codepl ex.com/wikipage ?title=Code-bas ed%20Configurat ion) which makes some aspects of wrapping easier.
SAP has not released any entity framework provider so far for HANA. It has shipped ODBC driver. I have downloaded the sample for writing custom provider, and started developing a provider for SAP HANA. I wanted to get help on this. If someone can let me know if there is any other sample which is more close to ODBC connectivity and ANSI sql generation which I should take as base and start customizing for HANA or I have no other choice but to use the same sample. Also, instead of SqlClient library I am using System.Data.Odb
c and creating odbcconnection and odbccommand etc. I hope that is the way to go. Thank you for all your help.
Entity Framework provider is based on ADO.NET provider model so it's not possible use ODBC directly. What you can try is to wrap your ODBC classes with ADO.NET classes (e.g. DbConnection derived class would wrap the OdbcConnection, DbCommand derived class would wrap OdbcCommand class and so on). I am not aware of any ODBC based driver for Entity Framework.
Hi Rohit, I would recommend not getting into this project without reading the blog series by legendary Matt Warren: http://blogs.ms
dn.com/b/mattwa r/archive/2008/ 11/18/linq-link s.aspx The project is also on codeplex: http://iqtoolki t.codeplex.com/ I also am in need for HANA EF provider but after getting to know this a little bit, I think this is something SAP should take on rather than individual programmers. Also, please consider deriving from the ADO.NET components family to provide HanaCommand, HanaConnection, HanaQuery etc. Please let me know of further developments. Best, Asher
Error 1 The remote server returned an error: (407) Proxy Authentication Required. ProviderTests
The tests are using XUnit. XUnit assembly is not part of the project but -if needed - is downloaded from nuget. This is done using another nuget package (nuget.commandl
ine) that is actually hosted on nuget - here is the link to this package http://nuget.or g/v1/FeedServic e.svc/Packages( )?$filter=tolow er(Id)%20eq%20' nuget.commandli ne'&$top=1&$ord erby=Version%20 desc. Seems that for some reasons nuget cannot be reached when building the project which is a reason for the failure. Can you try connecting to nuget from your browser (use the above link) and see if it works? Apparently it
Hi, I am working on my custom provider to support Entity Framework. I have followed the sampleentityfra
meworkprovider project and made enough progress. My problem is now when I select a table from ADO Entity Data Wizard and hit “Finish”, Entity Framework generates SQL strings in four passes specific to my store. The first pass is for the Table and it goes through fine, the second pass is for View and it processes fine. But on the third pass, which is for Constraints, my provider failed to process the generated SQL string. I have implemented DBProviderServi ces and DBProviderManif est. Most of the SQL generation codes are very similar to the sampleentityfra meworkprovider except I had to change some sql generation code to my store specific dialect. MS ADO provider, the first 3 sql generation starts with: SELECT [Join5].[Ordina l] AS [C1], [UnionAll4].[Ca talogName] AS [C2], [UnionAll4].[Sc hemaName] AS [C3], [UnionAll4].[Na me] AS [C4], [Join5].[Name1] AS [C5], [UnionAll5].[Ca talogName] AS [C6], [UnionAll5].[Sc hemaName] AS [C7], [UnionAll5].[Na me] AS [C8], [Join5].[Name2] AS [C9], [Extent2].[Name ] AS [Name], [Extent1].[Id] AS [Id], CASE WHEN ([Extent1].[Del eteRule] = 'CASCADE') THEN cast(1 as bit) WHEN ([Extent1].[Del eteRule] <> 'CASCADE') THEN cast(0 as bit) END AS [C10] My ADO provider, all 3 sql generation starts with: SELECT "Project3"."C11 " AS "C1", "Project3"."Cat alogName" AS "CatalogName", "Project3"."Sch emaName" AS "SchemaName", "Project3"."Nam e" AS "Name", "Project3"."C1" AS "C2", "Project3"."C3" AS "C3", "Project3"."C4" AS "C4", "Project3"."C5" AS "C5", "Project3"."C6" AS "C6", "Project3"."C7" AS "C7", "Project3"."C8" AS "C8", "Project3"."C9" AS "C9", "Project3"."C10 " AS "C10", "Project3"."C12 " AS "C11" My question is, even I am using almost same sql generation code, why is the difference. Thanks, Syed.
It's hard to tell why you see a different output without knowing/seeing the differences in SQL generation code. You could debug EF Sample Provider and your provider side by side to figure out where the differences start - this will be most likely the place to take a deeper look at.