Is it possible to use Entity Framework (any version, including, and preferably 4.0) to query an SSAS cube (preferably SSAS 2008)?
Yes, now it is possible to use EF 4.0-4.1 to query SQL Server Analysis Services 2008 OLAP cubes (it is something like LINQ to MDX / SSAS).
You will need to install SSAS Entity Framework Provider (tm) to enable that. You can checkout and request SSAS Entity Framework Provider here:
http://www.agiledesignllc.com/Products.htm
Disclosure: I work for Agile Design LLC - the company who offers this product.
I would say no. There's a few questions on here looking for that, asking for the ORM equivalent for SSAS and such. LINQ to MDX would be lovely, but so far as is known it's just not on the cards.
I've been looking and pondering for years for something simple in code to get data back to the middle tier, but I've never found it. Things like AdomdDataReader and CellSet are OK, but require hand-written MDX, there's no easy way around it.
Sorry for the bad news, if anyone can prove me wrong I'd be overjoyed :/
Related
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
This code:
ALTER DATABASE SCOPED CONFIGURATION
SET LEGACY_CARDINALITY_ESTIMATION=ON
makes my Entity Framework code generation very fast.
However I have also learned that I need to set it off my code generation completes.
Can some one explain what actually the code does? I went through google but could not find the understanding.
I am using SQL Server 2016 and Entity Framework v6
It looks like this is a known issue with new CE and the reverse engineering queries in EF. It also looks like the issue is specific to SQL 2016 and has bounced back and forth between the SQL team and the EF team.
The first fix posted was the one you mention in your post, ALTER DATABASE SCOPED CONFIGURATION SET LEGACY_CARDINALITY_ESTIMATION=ON
After this it looks like updating statistics on tables is a viable solution.
Check out this link - https://github.com/Microsoft/sql-server-samples/issues/57
I got an existing database with many tables which are accessed using stored procedures only (no O/RM). I'd like to create new tables in this database using Entity Framework and the Code First approach.
Do all the tables in my existing database need to be modelized in my Entity Framework classes? Will I be able to hand-code only the new classes I need in my DbContext? Other tables really need to stay untouched and away from O/RM for the moment.
Note: I'm going to be using the latest EF5.
As for now the Power Tools only allow you to reverse engineer all tables and views in the DB, which can be a problem if you have a big DB, with hundreds of objects, you do not want to reverse engineer.
However, I found an easy workaround for that:
Create a new technical user for the reverse engineering. To this user you only grant permission to the tables and views, that you want to be reverse engineered.
Have fun!
You are under no obligation to map any given table with EF. If you already have a database, you may want to consider reverse-engineering your database with the EF Power Tools available from Microsoft. I did this recently with a MySQL database that I had for testing purposes and it worked quite well!
If you are new to EF an advantage is that the PowerTools write a ton of code for you, which will help you get a grasp on the syntax of Code First. You will need to modify the output but it is a great start. I really believe that this approach will give you the least headache.
The EF PowerTools can be found here: http://visualstudiogallery.msdn.microsoft.com/72a60b14-1581-4b9b-89f2-846072eff19d/
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.
Well, there is similar question for Oracle, now, Postgres?
Entity Framework is designed to be database agnostic. It doesn't use any SQL Server feature, and doesn't natively support things as the Geometry features of SQL Server.
You won't be able to use any feature specific to Postgres (but you can write your Entity Framework extensions to do it, however)
But the point is: It will work.