Question Stephen Wilson · Oct 10, 2018

Has anyone used .NET Core EF with Caché?

What would a sample DbContext look like and how would you register the DbContext in the Startup.cs  ConfigureServices method?

Comments

Stephen Wilson  Oct 24, 2018 to Michael Cohen

. They are two different platforms and is most likely why you could not find ConfigureServices in the Intersystems docs.  For a Micosoft SQL Server, your ConfigureServices method could have

            services.AddDbContext<MyMSDBContext>(cfg =>
            {

                cfg.UseSqlServer(_config.GetConnectionString("MyConnectionString"));
            });

but I haven't seen any examples in Caché! Perhaps there is a development opportuntiy to write a NuGet package? Here's a Microsoft link to other popular database providers supported within .NET Core.

PS. If you use RESTful HTTP methods to talk to the database then you don't need a database provider as the data can be returned as part of the HTTP Response.

0
Agustin Berbegall  Nov 10, 2018 to Stephen Wilson

It's a pity that this does not exists yet, it would be very interesting to have an Intersystems EF Core Provider.

At least having support for Scaffold-DbContext and generating the Context and Entities automatically out of an existing cache database would be very nice.

Is there any plan to support it?

Cheers!

0