I'm looking into WCF and woud like to created my framework in a RESTful way. I've just started looking into ADO.NET Data Services, but it seems it only supports SQL Server, is this correct? Can you run in against Oracle?
ADO.net Data Services and WCF both feed off a model. You can provide restful access to your data using a proper model layer that accommodates Oracle driver. Things might not work out of the box. In WCF you can use an Oracle friendly mapper like NHibernate and expose your datacontracts in a restful way. For Astoria you might need to hunt for a EF provider for Oracle db. But its possible.
EDIT: It seems ADO.net Entity Framework is already Oracle friendly ! You have no problems going pure WCF or Astoria way
Please see the following question for a more up-to-date and thorough answer.
Is it possible to expose data from Oracle using OData?
ADO.NET Data Services relies on the ADO.NET Entity Framework, and that definitely also supports Oracle. WCF in itself is totally database-agnostic - no limitations here. I don't see why you shouldn't be able to use ADO.NET Data Services with an Oracle backend.
Marc
Here's a link on how to do so -
http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/dotnet/EntityFrameworkWCF/WCFEntityFramework.htm
You'll actually need to install ODAC for EF, which is currently in beta:
http://www.oracle.com/technetwork/topics/dotnet/downloads/oracleefbeta-302521.html
It works fine for me in VS, but not in IIS, which is the issue I'm facing.
HTH
Related
I'm new to Core 2 and am trying to connect to a SQL server to query some info.
I cant get EFCore to scaffold the database because it's an old DB with badly designed links, the scaffold kicks it out and won't work.
I can't alter the tables, it's read only. how can i get this to work, or, can i access the db in a different way? I cant find anything on google that doesn't use efcore.
Thanks,
There are a couple of solutions to achieve this. Since ASP.NET Core 2.0 implements .NET Standard 2.0, you can use ADO.NET with ASP.NET Core. So you can write stored procedure or query to get your data with dataset or datareader.
There are also other lightweight ORM tools like Dapper or NPoco. Both these ORMs allow developers to write SQL queries. Please refer to below posts to find out how to use them with ASP.NET Core
Use Dapper ORM With ASP.NET Core
Use NPoco ORM With ASP.NET Core
I have an oracle data source that i would like to expose using odata.
The reason i need to use odata is that there are many parameters and it is hard to write a query for each combination.
How can i connect my oracle database to odata to achieve this given that the database is version 10.2g which as i have read does not support Entity framework.
Thanks
One of the solutions is using NHibernate, and here is a sample: http://aspnet.codeplex.com/SourceControl/latest#Samples/WebApi/OData/v4/NHibernateQueryableSample/.
I'm working on exposing access to an Oracle database table for a SharePoint implementation.
From what I've seen, Oracle is not directly supported by BDC, so I'm trying to write a WCF service to perform the CRUD operations against my table.
I've been researching on Google with very limited success. Can anybody point me to an example of using WCF to modify data in an Oracle database?
I was able to figure this out by following this tutorial (leaving out the Silverlight stuff since I didn't need Silverlight)
How to connect to Oracle database using WCF in Silverlight
I need to write a data provider class to pull data from a sql database for use in a webpage that will display a bing map. Does anyone have a link they could provide with a tutorial on how to do this?
I have very little experience using a db to provide dynamic data for a web page so any help is appreciated. The Database is a sql Azure databse.
You need to research Data Access in .NET and ORM technologies for .NET. This question deals with similar concepts.
Simple Data Access Layer
Note: There is nothing "special" you need to do to apply the standard .NET data technologies to Azure SQL.
Im interested to find out what techniques developers are using to connect to a Windows Azure instance running in the cloud?
From what i understand it is very similar to SQL Server with two of the key differences being Multiple Active Recordsets are not supported and idle/long running connections are automatically terminated by azure. For this microsoft suggest incorporating retry logic in your application to detect a closed connection and then attempt to complete the interrupted action. Does any one have example code that they are currently using on this?
To build out the data layer i was looking at various ORMs. Since im going to be accessing azure from windows azure (ie seperate boxes) to me it would seem key that any ORM mapper would need to support asynchronous methods so as not to block any windows azure instances.
Any suggestions as to which ORM mapper to use, or comments on what you are currently using
I have successfully used NHibernate with Azure and we are in the process of building a commercial app on top of NHibernate. The only problem that I had was with the connection pools when running locally and connecting to SQL Azure in the cloud - which was fixed when turning connection pooling off.
You may find similar problems with other ORM's... SQL Azure is less patient (for obvious reasons) than most people are used to. Connections timeout quicker, recycle sooner and so on.
Test first!
Here's one specifically designed for Azure:
"Telerik recently announced the
availability of Open Access, the first
ORM that works seamlessly with SQL
Azure relational databases in the
Windows Azure cloud."
And a few commenters at the Azure User Group recommend LLBLGen and Entity Framework.
I've been using Entity Framework - runs without any problems, just a different connection string.
What you do have to think about is your connection strategy, and how efficient your queries are. I've got method that's easy to write in EF - I've got a new record that could be duplicated, so I check if it's there, and if not, add it.
EF makes it really easy to do this, as if you're just accessing a local collection. BUT ... if you're paying for your dB access because it's in Azure and not on your local network, hmm, maybe there's a better (aka cheaper) way of doing that
According to Ayende, NHibernate "just works" with SQL Azure.
We have been using NHibernate without any customization on Azure (indeed, it just works), you can check Lokad.Translate as an open source example of such use.