Is it possible to use Entity Framework with a DB2 iSeries AS/400 - entity-framework

Im new to Microsoft entity framework and wonders if it's possible to use this framework with a DB2 iSeries AS/400? Are there any problems at all when working with this kind of "legacy systems"? and the EF framework?

You can use Entity Framework to connect to an ISeries DB2 database one of three ways:
1. If you purchase the license to IBM's DB2 Connect product. The license is around $12,000 which is outrageous. Also, there is not enough good documentation for how the DB2 Connect product actually works, how it installs, or its possible benefits. I've contacted one of their resellers to get a test install and it was not an intuitive process so we never purchased the product. Likewise, there doesn't appear to be any demos. I don't understand how IBM can have one of the best servers available but don't bend over backwards to leverage their product to Microsoft developers.
That said, if you research this topic you will find much information saying that you can use Entity Framework using their ADO.Net data server provider. I went down this path but I will warn you that their data server provider only works when DB2 connect is installed. This is confusing because IBM advertises this ability but doesn't often show the direct correlation between the two products so you're often left thinking that it will work without db2 connect which it will not at this time.
2. Purchase a third party data provider designed for Entity Framework. Progress software's Data Direct is super easy to use. I don't like how their server licensing works though because their server license is per core processor for your app server. This is flawed because this assumes you only have one app server when in reality, people regularly need to have different app servers for load balancing. I would prefer they just license per one ISeries server. However, you can purchase the licenses for each individual user if you decide to do that.
3. Write your own data provider. This is possible but there are obvious drawbacks.

It sort of looks like it is - see here:
http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/topic/com.ibm.swg.im.dbclient.adonet.doc/doc/c0054118.html?resultof=%22%65%6e%74%69%74%79%22%20%22%65%6e%74%69%74%69%22%20%22%66%72%61%6d%65%77%6f%72%6b%22%20
but quite honestly, I'm not 100% sure - especially not if it supports EF 4.0 (yet).
Or check out the IBM DB2Connect site and search from there...

Related

Is it possible to use Entity Framework Core with ODBC?

My company's main software application hasn't been updated in twenty years. I expect to soon be working on a complete rewrite of it. To that end, I am beginning to work my way through the book "Pro ASP.Net Core 3" by Adam Freeman (8th edition).
Our application was written to be independent of specific database types. Most of our customers use PostgreSQL, but a few use SQL Server. Therefore, we use ODBC because ODBC drivers exist for both of those databases, as well as several others. The application does not do anything fancy with the databases, and ODBC works well. We configure an ODBC DSN to talk to whichever database the customer has, and the application itself doesn't have to be changed.
A search on "Entity Framework Core ODBC" led me to the EF Core Github, where people have asked similar questions, and the answers were mostly along the lines of "why on earth would you want to do that?". Well, I need to do that.
Can I use EF Core with ODBC, or is there some other way that I can set up an Entity Framework Core application that does not have to be modified if the underlying database changes from PostgreSQL to SQL Server?
You could use your appsettings.json to store a value used to swap between the two. Those environment configs get reloaded on change (though you might have to restart your application to read them again, I'm not sure on that one).
Regardless something along the lines of this would suit your needs I think.
if (Configuration.GetSection("dbOptions")["postgres"]))
services.AddDbContext<ApplicationDbContext>(options => options.UseNpgsql(Configuration.GetConnectionString("PostgresConnectionString")));
else
services.AddDbContext<ApplicationDbContext>(options => options.UseSqlServer(Configuration.GetConnectionString("SqlServerConnectionString")));
EDIT: I placed this in Startup.cs where you would normally configure the DBContext. I use a similar solution reading off the Environment type to load either the Prod or QA connection strings based on deployment. In principle, this should accomplish the same task without the need for rebuilding and redeploying the code base.

MongoDB and Entity Framework Core 2.0

So, I've read repeatedly that EF Core will support NoSQL databases but I can't seem to find any "official" NoSQL database providers, or even a NoSQL framework in the source code. (By "find" I mean search for "nosql".)
I've had a quick look at ADO.NET (paid) and crhairr/EntityFrameworkCore.MongoDb but they are both third-party. MongoDB (the specific database I was looking into) has their own .NET driver but it doesn't seem to integrate EF Core.
Anyway, what I really want to know is:
Does/will EF Core support NoSQL databases? What does "support" entail?
Does/will the MongoDB .NET driver support EF Core?
The results of my research so far seem to indicate that I'm misunderstanding something and it would be great if anyone could point it out.
Currently, the 2.1 EF Core roadmap doesn't show any new providers for NoSQL DBs.
(https://learn.microsoft.com/en-us/ef/core/what-is-new/roadmap)
Yet, they are now focused for Azure Cosmos, which is a cloud DB service. In Cosmos, you can use MongoDB API. More info about the progress (https://github.com/aspnet/EntityFrameworkCore/issues/8443) and Cosmos & MongoDB(
https://learn.microsoft.com/en-us/azure/cosmos-db/create-mongodb-dotnet)
For non third party MongoDB provider, it will take some time. You must understand, that .NET Core is a huge change from .NET Framework, because it now embodies the open source culture. Many libraries and tools are available and will be available without "Made by Microsoft" stamp. It's up for the community to create libraries and tools for .NET Core.
There is an open issue on MongoDB's site about providing an officially supported EF Core provider. If this is something important to you, you can vote for it there. (note, you must sign up for an account on their site to vote)
https://jira.mongodb.org/browse/CSHARP-3837
Update:
3/31/2022 - Status was changed to Backlog
4/28/2022 - Status was changed to Needs Scope, Quarter set to
FY23Q2
6/22/2022 - Status was changed to Scoping
7/29/2022 - Quarter set to FY23Q3
1/20/2023 - Status was chagned to Backlog

What's the likelihood of Orchard CMS running on postgresql database?

And if that is not possible, what are the implications of using SQL Express? Would there be anything wrong with using SQLExpress for the CMS db, and postgresql for my app?
Orchard does use NHibernate under the bonnet (http://www.orchardproject.net/docs/Orchard-dependencies-and-libraries.ashx), however the orchard web platform installer only allows you to choose between the sql compact database or a SQL Server instance (including express) -
see http://www.orchardproject.net/docs/Installing-Orchard.ashx
So out of the box at the moment no but as Raymond points out you can always write your own provider and contribute it to the Orchard project. (Check out this forum response to mysql - http://orchard.codeplex.com/Thread/View.aspx?ThreadId=229968).
NHibernate is the ORM that Orchard is using to access the database. NHibernate supports postgresql so the answer is yes. And ofcourse you can also write your own dataaccess layer that services access.
A few months after this question was asked, Marek Habersack added Mono support to Orchard. Part of that effort was adding support for running Orchard on PostgreSQL.
The patches for this must have been accepted as the current instructions for running Orchard on Mono do not require them to be added.
There were problems, at least initially, with the connection being dropped but there are reports of it running well.
I am not deeply familiar with this particular product, but unless they explicitly state that they support a certain SQL implementation, the chances are extremely slim that it would just happen to work. A quick look around their site suggests that you will need to use Microsoft's SQL Server.

Entity Framework and Synchronizing a database solution?

I currently have an n-tier application using entity framework 4.0 and we're looking at synching the contents of database between redundant servers. Does anyone have any experience on tips on how best to approach a solution?
From an architecture point of view, you need to consider if you want to do this at the application level or the database level.
At the application level you could write to both databases any time you made a change.
At the database level you could use the replication tools build into the database that you use.
You could also use a 3rd party tool. There is also a sync framework available from Microsoft.

Suggestions needed for replacement of Oracle SSO 10g in an 11g environment

We're currently using the SSO component of Oracle 10g App Server to authenticate users on our external / internet facing client "portal" (think similar to online banking)
SSO uses Oracle Internet Directory to store it's data, and we've been able to use PL/SQL and Java to access and modify the data held in OID (e.g create/drop users, change/verify passwords etc)
With the advent of 11g, Oracle appears to have "orphaned" SSO… it is available, but only as an add-on, and it appears to have been superseded by Oracle Access Manager. I'm guessing that it will have been dropped together by 12g. Plus it looks pretty difficult to install and get running correctly.
So, I'm wondering if anyone has any experience of having had the same migration problem as us? If so, what did you do?
Alternatively, does anyone have any experience of doing something similar using Oracle Access Manager? Do you think it will do what we want?
Or is there a better road to go down? Is there something else I should be considering?
Sorry for the very broad question, but it's one of those situations where a person's experience of what does + doesn’t work can make an enormous difference to us making some progress in a timely fashion. Thanks.
From my knowledge, Oracle Internet Directory (OID) is an LDAP compliant directory whereas Oracle Access Manager (OAM) is much more complex and consists of two main systems:
Identity System (users, groups,
workflows)
Access System (single/multi domain
SSO solution for Web and non-Web
based applications).
Access Manager relies on an Identity Server which is a stand-alone server process that communicates with any Directory Server (AD, OID, Sun Directory server..).
So you can use the new OAM and link it with your existing OID... to retrieve users/groups and metadata. All that you could do with OID will be doable with OAM as it brings more abstraction layers.
But in my opinion, and considering your case, directly accessing LDAP servers (OID, AD, etc) and using a light and "home made" SSO system is cheaper than relying on those big systems.... I think OAM is a usefull solution when you have lots of heterogeneous applications (web, non web, mobile, ...) and/or multiple organizations/domains with links and/or you need a very scalable approach.