Sep 30 Effective EF – Entity Framework Tips from Microsoft
Alex James from Microsoft has an excellent series of Entity Framework tips , that offer generic best practices on how programming effectively with the Entity Framework. Although some of his tips focus on EF4, there's lots useful material for those embarking on EF 1.0 projects. Enjoy !
Sep 28 Effective Oracle and EF – SQL Server to Oracle Migrations (I)
Early on in our EF development cycles, I gave our .NET QA team an unusual challenge:- Spin up our test suites in readiness for our upcoming ADO.NET Entity Framework support for Oracle, except without an pre-QA ADO.NET EF provider ready for Oracle. Our excellent QA got to work and built our the majority of our test suites on SQL Server, and when the time came we jumped to Oracle as we ramped up to our General Availability (GA) release in August. So why take such a roundabout route? The real motivation here was to prove a compelling value of EF. EF is ideally positioned to become a database agnostic API that gives .NET programmers portability across databases. This is something enjoyed by ODBC and JDBC developers across native and Java, and .NET developers can finally rejoice at this newly found productivity. To that end, the next series blog postings recounts the challenge originally given to our .NET QA team. The story itself is not the main takeaway – you’ll find tips and advice on how best to more between SQL Server and Oracle for your EF based applications. This is something we have received numerous requests for – whether you are building out your Silverlight app, your WC/F service, ASP.NET etc. application and you want to seamlessly encompass new Oracle data sources in addition to SQL Server or whether you are looking to shift your SQL Server based EF wholesale to Oracle, there’s compelling content for you here. With the Entity Framework (or any ORM for that matter) a well grounded notion of ‘data abstraction’ should be pervasive – application code can be developed separately without concerns about the underlying databases. Once the EF application is written, you don’t need to be concerned about the various features, SQL syntaxes of different databases, etc. That’s the desired goal but in reality, there are minor changes to the application, schema, or the EDMX files (SSDL, CSDL, and MSL). You can quickly asses the portability of your apps across data sources by grabbing a copy of the Query Samples from here. You find plenty of good Linq to Entities, QueryBuilder, EntitySQL, ObjectServices and Design API's sample to run with.
Over the course of the next few postings, we'll look at these challenges… • DataType mapping between SQLServer and Oracle
• Identity Columns vs Sequences mismatch
• Boolean datatype or Int16
• Stored Procedures with Ref Cursors 2. DataType matching between SQLServer and Oracle Next up, you’ll need to better understand how best to line up the often disparate data types between SQL Server and Oracle. For Progress DataDirect Connect for ADO.NET we operate on the data type mactching below: SQL Server Oracle tinyint number(3, 0)* smallint number(5, 0)* int number(10, 0)* bigint number(19, 0)* float float, binary_float real float, binary_float or number(19, 4) char(n) char(n) nchar(n) nchar(n) varchar(n) varchar2(n) nvarchar(n) nvarchar2(n) small-datetime date datetime date, timestamp with local timezone datetimeoffset** timestamp with timezone image blob text clob binary(n) blob or raw(n) varbinary(n) blob or raw(n) bit number(1, 0) smallmoney number(10, 4) money number(19, 4) * For integer value one can put a table constraint on columns to have the values within the limited range.
**Available only in SQLServer2008

Oracle does have numerous other datatypes that don’t necessarily translate from SQL Server, but that’s a discussion for another day. Identity Columns vs Sequences Mismatch & Limitations Now one of the more vexing topics for EF Oracle developers. Microsoft SQLServer has long standing and widely used notion of auto-increment columns which rely on specifying a column to be of type “identity”. This specification does not translate easily to Oracle parlance. Oracle savvy developers may have a reflex reaction towards Sequences as a worthy equivalent but this can lead to a trouble. SQLServer’s identity property is bound to a specific table column and this is easily verifiable using established metadata calls. Oracle’s Sequences are more like objects that do not maintain the same relationship and are expressly not bound to any tables or columns. Consider the following DDL – note the EmployeeID column is designated as an identity column.
Let's see this case for SQLServer first
SQLServer:
Suppose there is a table called “Employees” whose partial definition is as shown below – Note the property IDENTITY on EmployeeID column CREATE TABLE [ dbo ] . [ Employees ] ( [ EmployeeID ] [ int ] IDENTITY ( 1 , 1 ) NOT NULL , [ LastName ] [ nvarchar ] ( 20 ) COLLATESQL_Latin1_General_CP1_CI_AS NOT NULL , [ FirstName ] [ nvarchar ] ( 10 ) COLLATE SQL_Latin1_General_CP1_CI_AS NOTNULL , ... Fetching the column meta data information on EmployeeID (e.g. using GetSchemaTable()), here is what one will get ColumnName
ColumnOrdinal
ColumnSize
NumericPrecision
NumericScale
IsUnique
IsKey
BaseServerName
BaseCatalogName
BaseColumnName
BaseSchemaName
BaseTableName
DataType
AllowDBNull
ProviderType
IsAliased
IsExpression
IsIdentity
IsAutoIncrement
IsRowVersion
IsHidden
IsLong
IsReadOnly The “IsIdentity” declaration indicates this column’s identity qualities. If you have a similar table construct in an Oracle database, the column metadata information is not as expressive, as you see from the results below ColumnName
ColumnOrdinal
ColumnSize
NumericPrecision
NumericScale
DataType
IsLong
AllowDBNull
IsUnique
IsKey
BaseTableName
BaseColumnName
BaseSchemaName The EF uses the behavior of auto-increment columns (such as IDENTITY) extensively, and Oracle requires explicit declaration of sequences. An example below First, lets create a sequence CREATE SEQUENCE supplier_seq
    MINVALUE 1
    MAXVALUE 999999999999999999999999999
    START WITH 1
    INCREMENT BY 1
    CACHE 20 ; Now, insert values into a table which uses the above sequence INSERT INTO suppliers
( supplier_id , supplier_name )
VALUES
( supplier_seq . NEXTVAL , 'Kraft Foods' ) ; The story doesn’t end here and we are actively looking at ways to make this more seamless for our end users, so you can achieve portability between SQL Server and Oracle in this instance. More on this possibly in future postings. You can of course add you voice by commenting below or drop a note to our support team if you need this functionality. In our next posting we’ll look into the details of how best to deal with Oracle Number types, and Int16s.
Sep 25 Effective EF with Oracle – Console and ASP.NET Starter Kits
Continuing our theme of how to get up and running with the ADO.NET Entity Framework and Oracle we've put together a set of samples and how-to's for common Visual Studio tasks – console and ASP.NET applications. We've included download samples as well: Console Application
How-To | Sample Code ASP.NET
How-To | Sample Code Of course you'll need a copy of our Oracle ADO.NET Entity Framework provider too. My thanks go to Mike Frost for spearheading the effort in pulling these samples together.  
Aug 31 Effective EF with Oracle – RIA & Silverlight 3
Over the past few months we received numerous how-to requests on how best to wire up a Silverlight 3 application with ADO.NET EF, ADO.NET Data Services and Oracle for use in an RIA application. To meet that need, we've put together how-to that we are now publishing on our .NET Connections blog. Full credit goes to our team over at PSI, specifically Avadhoot Kulkarni for doing the majority of leg work here. First make sure you have all the prerequisites, such as  Microsoft Visual Studio 2008 SP1 , Microsoft .NET framework 3.5 SP1 , Microsoft Silverlight 3 , Microsoft Silver-light plug-in for Visual Studio 2008 SP1 and of course  Progress DataDirect Connect for ADO.NET 3.3 to connect to Oracle. Let's start with creating database schema on our Oracle database. I will create a single table called Categories. CREATE TABLE "Categories" (
"CategoryID" NUMBER ( 10 , 0 ) NOT NULL ,
"CategoryName" VARCHAR2 ( 15 ) NOT NULL ,
"Description" LONG NULL ,
"Picture" BLOB NULL ,
CONSTRAINT "PK_Categories" PRIMARY KEY ( "CategoryID" )
) And we'll populating the table much as you'd expect. INSERT INTO "Categories" ( "CategoryID" , "CategoryName" , "Description" , "Picture" ) VALUES ( 1 , 'Beverages' , 'Soft drinks, coffees, teas, beers, and ales' )
INSERT INTO "Categories" ( "CategoryID" , "CategoryName" , "Description" , "Picture" ) VALUES ( 2 , 'Condiments' , 'Sweet and savory sauces, relishes, spreads, and seasonings' )
INSERT INTO "Categories" ( "CategoryID" , "CategoryName" , "Description" , "Picture" ) VALUES ( 3 , 'Confections' , 'Desserts, candies, and sweet breads' )
INSERT INTO "Categories" ( "CategoryID" , "CategoryName" , "Description" , "Picture" ) VALUES ( 4 , 'DairyProducts' , 'Cheeses' )
INSERT INTO "Categories" ( "CategoryID" , "CategoryName" , "Description" , "Picture" ) VALUES ( 5 , 'Grains/Cereals' , 'Breads, crackers, pasta, and cereal' )
INSERT INTO "Categories" ( "CategoryID" , "CategoryName" , "Description" , "Picture" ) VALUES ( 6 , 'Meat/Poultry' , 'Prepared meats' )
INSERT INTO "Categories" ( "CategoryID" , "CategoryName" , "Description" , "Picture" ) VALUES ( 7 , 'Produce' , 'Dried_fruit and bean curd' ) Next up, we'll create a new ASP.NET Application project in Visual Studio. 1.      Add a new Entity Model for our Categories using the Entity Data Model wizard in Visual Studio 2008. Check MSDN for more details here. 2.      Next, add new ADO.NET data Services component to the ASP.NET project name it as ‘CategoriesDataService1′. Modify CategoriesDataService1.svc file with the required Initialization rules as follows. public class CategoriesDataService1 : DataService Entities >
    {
        // This method is called only once to initialize service-wide policies.
        public static void InitializeService ( IDataServiceConfiguration config )
        {
// TODO: set rules to indicate which entity sets and service operations are visible, updatable, etc.
               config. SetEntitySetAccessRule ( "*" , EntitySetRights. All ) ;
               config. SetServiceOperationAccessRule ( "*" , ServiceOperationRights. All ) ;
        }
    } Configure your ASP.NET application to run on Specific port 50000 (for example) in the project properties\Web   Run the ASP.NET Application and browse our CategoriesDataService1.svc through browser. Now we can browse data through URLs like all Categories, as you'd expect. Or some specific category identified by its Entity key property. [In this case CategoryID] Now, let's spin up a Silverlight application in a new Visual Studio instance, while our new Data Service application runs. We'll add the Data Service reference to Silverlight app using “Add Service Reference” wizard. You'll next need to modify the Mainpage.xaml which defines our Silverlight UI. Notice it has a “Get Categories” button and a Data Grid with title “Categories”. x:Name = "LayoutRoot" Background = "White" >
        >
            Height = "30" />
            Height = "Auto" />
        >
        Orientation = "Horizontal" >
            Content = "Get Categories" Click = "Button_Click" Margin = "5"   > >
        >
        x:Name = "DataGrid1"   AutoGenerateColumns = "True" Grid.Row = "1" >
            >
                Header = "Categroies" >
                    >
                        >
                            Text = "{Binding CategoryName, Mode=TwoWay}" > >
                        >
                    >
                    >
                        >
                            Tag = "{Binding CategoryID}" Text = "{Binding CategoryName, Mode=TwoWay}" > >
                        >
                    >
                >
            >
        >
    > To ensure compile nicely, we need to add reference to the  System.Windows.controls.Data  to our Silverlight project and a namespace declaration in User Control block. xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data" Next up, open MainPage.xaml.cs to implement the “Button_Click” event handler. Add following lines to the .cs file. private void Button_Click ( object sender, RoutedEventArgs e )
       
Aug 31 Effective EF with Oracle – Ref Cursors in Stored Procedures II
If mapping stored procedures to the Entity Model wasn’t obvious enough, lets continue our discussion of our support of RefCursors and working effectively with EF. I have talked about Ref Cursors before and as we now have our GA out in the wild , it’s time for an update on full our Ref Cursor support. First, we’ve extended our support for Ref Cursors and EF– we previously we only had quasi-implicit only, now we’ve introduced explicit support. We’ve also settled on a SSDL representation that explicitly highlights Ref Cursors which is now our default and preferred approach. No manual user intervention is required and explicitly includes Ref Cursor parameters in both the generated SSDL which is then subsequently defined in the CSDL. First lets define a stored procedure, and a related Ref Cursor definition.       CREATE OR REPLACE PACKAGE types
      AS
      type cursorType IS ref cursor;
      END;       CREATE OR REPLACE PROCEDURE "CategoriesGet1" ( CATEGORYID IN number , myCursor OUT types . cursorType , CATEGORYNAME IN CHAR )
      AS
      BEGIN
      open myCursor FOR SELECT * FROM "Categories" WHERE "Categories" . "CategoryID" = CATEGORYID AND "Categories" . "CategoryName" = CATEGORYNAME
      ORDER BY "Categories" . "CategoryID" ;
      END; Generating a SSDL representation gives the following – notice ‘MYCURSOR’ is explicitly defined as a ‘Ref Cursor’. When you build an entity on this SProc, the type reference ‘ref cursor’ is carried top the CSDL layer and exposed to the application.         Name = "f_CategoriesGet1_" Aggregate = "false" BuiltIn = "false" NiladicFunction = "false" IsComposable = "false" ParameterTypeSemantics = "AllowImplicitConversion" StoreFunctionName = ""CategoriesGet1"" Schema = "DEFTS" >
          Name = "CATEGORYID" Type = "number" Mode = "In" />
          Name = "MYCURSOR" Type = "ref cursor" Mode = "Out" />
          Name = "CATEGORYNAME" Type = "char" Mode = "In" />
        > For simplicity’s sake, we’ll map use ObjectServices to interact more directly with our generated model, and then retrieve the value. ObjectParameter param = new ObjectParameter ( "MYCURSOR" , System . DBNull . Value ) ;
var cq = Provider. context . GetCategories1 ( 1 , param, "Beverages" ) ; So why consider a non-explicit approach? As we’ll see in later postings in this series it is sometimes very important to build in model portability in to your EDM model. With EF it is relative easy to can safe guard your model and quasi-implicit ref cursors helps achieve this. As you become more familiar with EF, getting stuck in with the EDMX file is something you’ll become more comfortable with. In this occasion, there is no exception. Let dig in and manually alter SSDL definition as follows:
To safe guard the sanctity of the CSDL, we make a number of adjustments to the SSDL layer, first modify the preamble in the EDMX file to include an additional namespace, ‘ddtekora’. Version = "1.0" xmlns:edmx = "http://schemas.microsoft.com/ado/2007/06/edmx" xmlns:ddtekora = "OracleEntityProviderExtensions" > Next, we remove ref cursor parameter and migrate it to an attribute in our function declaration taking care to match each parameter with the logical parameter name If there are more than one Ref Cursor parameters who want to implicitly support, they too should be removed and placed in the attribute list separated by commas.         Name = "f_CategoriesGet1_" Aggregate = "false" BuiltIn = "false" NiladicFunction = "false" IsComposable = "false" ParameterTypeSemantics = "AllowImplicitConversion" StoreFunctionName = ""CategoriesGet1"" Schema = "DEFTS" ddtekora:RefCursorParameters = "MYCURSOR" >
          Name = "CATEGORYID" Type = "number" Mode = "In" />
          -->
          Name = "CATEGORYNAME" Type = "char" Mode = "In" />
        > Our code above simplifies to the following var cq = Provider. context . GetCategories1 ( 1 , "Beverages" ) ;
Aug 13 Released! ADO.NET Entity Framework Support for Oracle
I am happy to announce that we've released our GA for Connect for ADO.NET 3.3 ! This includes our support for the ADO.NET Entity Framework for Oracle and a host of enterprise-ready features that will greatly enhance your experience with EF deployments on your Oracle systems. Let us know what you think (comment below) and go grab a copy of our trial so you can get started today!
Aug 4 Visual Studio Magazine Readers Choice Award!
Always happy to highlight awards when we win them. Today is no exception. Today Visual Studio magazine “announced that its Progress® DataDirect Connect® for ADO.NET data providers have been honored with a Readers' Choice Merit Award in the product category of Data, Network and Web Connectivity” . Congrats to the team on a well deserved award!
Jul 9 Splitsville for System.Data.OracleClient & .NET – Part Deux
There's been a lot of buzz (see below for some collected links) about Microsoft's decision to deprecate System.Data.OracleClient). I've received numerous emails, and as a company we've been watching the conversation in particular tracking some vociferous opinions circulating as to the perceived quality of third-party options. If you've used OracleClient for some time, I can certainly appreciate that you may be used to some of the quirks and baggage such as the native OCI Client dll that you used for many years. As a third-party innovator, we are part of a healthy and thriving community of outfits who are fully engaged in building quality technologies on the .NET platform – just walk the conference floors or either TechEd or PDC and it is plain to see. Still curious on how we do it? Check out this for on details on how we have the most rigorous standards for data connectivity anywhere. We've baked DataDirect Technologies 20-year history providing standards-based data connectivity into our ADO.NET providers. See the difference for yourself and go grab a copy of the DataDirect Connect for ADO.NET data provider for Oracle.     You can also join me on an online webinar, next week where I delve into some of the details on this recent announcement. Details here . As I mentioned above, here's a relatively authoritative list with lots of perspectives on the impact of Microsoft's announcements. Enjoy! ADO.NET team blog: System.Data.OracleClient Update OakLeafSystems: Windows Azure and Cloud Computing Posts for 6/15/2009+ The Register: Microsoft kills Visual Studio's Oracle data connection Jeffrey Schwartz on RedmondDeveloper “ Microsoft Kills Its Oracle Data Provider for ADO.NET ” P2PNET.net: Windows Azure and Cloud Computing Posts for 6/15/2009+ VistaDB .Net Database Blog: Microsoft deprecating Oracle Client from ADO.NET 4 DotNetKick.com: Microsoft deprecating Oracle client in Dot Net 4
ShareCatalog: Microsoft kills Visual Studio's Oracle data connection Mark's Stuff: ADO.NET team: System.Data.OracleClient Deprecated Next Gen Enterprise; Enterprise Trends: Enterprise headlines and summaries, 2009-06-16 ISV Developer Community: Partners Provide Support for Oracle ADO.NET Jose R. Guay Paz: News: System.Data.OracleClient update Reflective Perspective: Windows Azure and Cloud Computing Posts for 6/15/2009+ Jason N. Gaylord's Blog: The Technology Post for June 16th, 2009 Dotnetslackers.com: The Technology Post for June 16th, 2009 DBdesc: System.Data.OraClient deprecated in .NET 4.0 Today India News: Microsoft corp discontinuing .Net link to Oracle databases Linux Plus: Microsoft kills Visual Studio's Oracle data connection Mark Williams :: Blog: Microsoft To Deprecate System.Data.OracleClient Slumped Over Keyboard Dead: Microsoft kills Visual Studios Oracle data connection Daily Technology News: Microsoft halting .Net link to Oracle databases (InfoWorld) Boycott Novell: Microsoft kills Visual Studio's Oracle data connection Windows Live: Microsoft .NET Provider for Oracle dead The Code Project: Microsoft Kills Its Oracle Data Provider for ADO.NET Less Than Dot: Microsoft Kills Its Oracle Data Provider for ADO.NET Julie Lerman's Blog | Don't Be Iffy: Oracle and ADO.NET- Microsoft: Deprecated; Oracle: quiet, DataDirect:Beta and DevArt:Released Joacim's view on stuff: Oracle gets decorated by Microsoft… with an Obsolete Attribute
Jun 26 Effective EF with Oracle (Stored Procedures with REF CURSORs)
Working with Oracle REF CURSORs and Stored Procedures is an often used mechanism when working with Oracle data sources. REF CURSORS, as a PL/SQL data type offers a pointer-like address that is an effect a memory location of a query address space. The address space is much like a standard result set (or DataSet in .NET parlance), but it allows you deal with results of query on the Oracle server. You find more details here and here . With what I like to call vanilla ADO.NET using either the OracleCommand or DbCommand objects, you’ve a few choices in how to deal with REF CURSORs depending on how much control you want from your application.You can deal with REF CURSORs ‘ implicitly ’ in which case its not necessary to set your stored procedures parameters specifically using a specialized description. This can be a nice way of supporting a more diverse set of stored proc calls in a smaller code base. With the explicit REF CURSOR support you’ve more control as you can specify the OracleDbType.RefCusor description to tag your stored proc parameters objects as ref cursors. All of these are configurable via the ‘ Ref Cursor Mode’ connection string option. With EF, we approach the stored procedure and REF Cursor challenge by defaulting to the ‘implicit’ mode – this maximizes the portability of your EDM across multiple data stores, which as I discussed earlier . Take the following as an example. First we’ll create the package then procedure within this package which we will use with EF; the SQL syntax follows below:
First create a package to define our own datatype cursorType as ref cursor. CREATE OR REPLACE PACKAGE types
      AS
     type cursorType IS ref cursor;
  END; Next, create Stored Procedure using the cursorType defined above CREATE OR REPLACE procedure "CategoriesGet" ( CATEGORYID IN number , myCursor OUT types . cursorType )
      AS
      BEGIN
      open myCursor FOR SELECT * FROM "Categories" WHERE "Categories" . "CategoryID" = CATEGORYID;
   END; With the procedure is created, we can generate, but in this case we will create a SSDL map to start the process of wiring this into our EDM. Obviously either the EDMGen tool or Visual Studio Designer will do this for you.
Name = "f_CategoriesGet1_" Aggregate = "false" BuiltIn = "false" NiladicFunction = "false" IsComposable = "false" ParameterTypeSemantics = "AllowImplicitConversion" StoreFunctionName = ""CategoriesGet1"" Schema = "ADOVS6" >
          Name = "CATEGORYID" Type = "number" Mode = "In" />
          Name = "MYCURSOR" Type = "ref cursor" Mode = "Out" />
          Name = "CATEGORYNAME" Type = "char" Mode = "In" />
> For our conceptual map, we can’t rely on the tooling to do this for so some manual intervention is required. Take particular note that the REF Cursor parameter is bound as Type=”Binary”.
Name = "Entities" >
    Name = "GetCategories" EntitySet = "Categories" ReturnType = "Collection(Model.Categories)" >
        Name = "CATEGORYID" Mode = "In" Type = "Decimal" />
        Name = "MYCURSOR" Mode = "Out" Type = "Binary" />
        Name = "CATEGORYNAME" Mode = "In" Type = "String" />
    >
> And of course the MSL file to wire our schema and conceptual models together.
StorageEntityContainer = "ModelStoreContainer" CdmEntityContainer = "Entities" >
        FunctionImportName = "GetCategories" FunctionName = "Model.Store.f_CategoriesGet1_" >
        >
> That’s it!
Now you are ready use your to write an application to call these procedure, and it should be of course accessible from EntitySQL, ObjectServices or my own personal favorite, LINQ. com. CommandText = "Entities.GetCategories" ;
com. CommandType = System. Data . CommandType . StoredProcedure ;
com. Parameters . Add ( "CategoryID" , DbType. Int32 ) . Value = 1 ;
com. Parameters . Add ( "CategoryName" , DbType. AnsiString ) . Value = "Beverages" ;
EntityDataReader rdr = com. ExecuteReader ( CommandBehavior. SequentialAccess ) ; With ObjectServices ///
/// There are no comments for Model.GetCategories in the schema.
///
public global :: System. Data . Objects . ObjectResult Categories > GetCategories ( global :: System . Nullable decimal > cATEGORYID, string cATEGORYNAME )
{
        global :: System. Data . Objects . ObjectParameter cATEGORYIDParameter ;
        if ( cATEGORYID. HasValue )
        {
                CATEGORYIDParameter = new global :: System. Data . Objects . ObjectParameter ( "CATEGORYID" , cATEGORYID ) ;
        }
        else
        {
                CATEGORYIDParameter = new global :: System. Data . Objects . ObjectParameter ( "CATEGORYID" , typeof ( decimal ) ) ;
        }
        global :: System. Data . Objects . ObjectParameter cATEGORYNAMEParameter ;
        if ( ( CATEGORYNAME != null ) )
        {
                CATEGORYNAMEParameter = new global :: System. Data . Objects . ObjectParameter ( "CATEGORYNAME" , cATEGORYNAME ) ;
        }
        else
        {
                CATEGORYNAMEParameter = new global :: System. Data . Objects . ObjectParameter ( "CATEGORYNAME" , typeof ( string ) ) ;
        }
        return base . ExecuteFunction Categories > ( "GetCategories" , cATEGORYIDParameter, cATEGORYNAMEParameter ) ;
} And finally LINQ…. Entities ent = new Entities ( ) ;
var cq = ent. GetCategories ( 1 , "Beverages" ) ;
Categories c = cq. First ( ) ; Many thanks to Avadhoot Kulkarni and Jayakhanna Pasimuthu for doing the heavy lifting for this posting!
Jun 25 Effective EF with Oracle
In conversations with many .NET developers and architects, I consistently hear a preference to build their initial implementations with SQL Server. In many cases, it’s perfectly logical to do this. If you want to spin your application quickly, it offers the least path of resistance to get things up & running. Once developers turn their application loose in their enterprise, there’s soon a need to expose their application to a much greater database diversity and it is a major pain to get your .NET applications to operate consistently or functional agreeably in such a diverse environment. With vanilla ADO.NET, and considering recent announements , there a number of strategies you can follow, you could even use the Enterprise Library’s, Data Access Application Blocks as way to provide a single ‘database’ context for your business application focused developers. EF gives you a huge leg up to solving this problem, as it offers a near ODBC-like database agnostic data access model regardless of whether you are programming at the LINQ, EntitySQL or ObjectContext interfaces. Coupled with EDM you have a consistent model that can, in theory offer a universal data access model for any number data sources, assuming the availability of EF providers. So with that in mind, we are embarking on a series of postings we will cover a range of topics where we’ll share our experiences in how we’ve been successful in making all our supported versions of Oracle work effectively with EF and Connect for ADO.NET. Check back often for what we hope will become an indispensible guide!
Powered by Feed Informer