Best practices

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
gfi
Posts: 2
Joined: Thu 06 Sep 2012 08:04

Best practices

Post by gfi » Thu 06 Sep 2012 08:14

Hi,

I'm working on an Entity Framework 4 project using SQL Server database (database first project).

We want to provide a way to easily switch between Sql Server and Oracle (11).

What are the best practices to do this ?

What product from devart should I use ?

I'm actually manually editing MSL & SSDL files but it's ..endless...

So can u help :) ?

Best regards

Shalex
Site Admin
Posts: 8240
Joined: Thu 14 Aug 2008 12:44

Re: Best practices

Post by Shalex » Fri 07 Sep 2012 13:33

gfi wrote:I'm working on an Entity Framework 4 project using SQL Server database (database first project). We want to provide a way to easily switch between Sql Server and Oracle (11). What are the best practices to do this ?
Usage of SQL Server and Oracle simultaneously in one application can be implemented in the following three alternative ways:
1. Creating repositories for 2 models
2. Using mapping which is loaded dynamically:
2.1. With 2 *.edmx. Only one of them generates the code of model and entity classes, another one is used as a source of XML resources (example: http://www.devart.com/efquerysamples.zip)
2.2. Only one model and database independent fluent mapping: http://www.devart.com/blogs/dotconnect/ ... plate.html
gfi wrote:What product from devart should I use ?
1. Entity Developer for Entity Framework (or Professional) to work with SQL Server: http://www.devart.com/entitydeveloper/editions.html
2. dotConnect for Oracle Professional (or Developer) to create EF models for Oracle: http://www.devart.com/dotconnect/oracle/editions.html
gfi wrote:I'm actually manually editing MSL & SSDL files but it's ..endless...
Entity Developer allows to edit SSDL in the design time.

Entity Developer allows only to import *.edmx but the output would be *.edml. Output can not be *.edmx because Entity Developer uses extra tags and attributes, additional features which are not supported by EDM Designer. Devart designer (*.edml) offers a wider range of functionality comparing to the standard designer.
We recommend you to use Entity Developer (*.edml, the Devart Entity Model item) because it has a lot of improvements comparing to EDM Wizard (*.edmx, the ADO.NET Entity Data Model item):
1) visual editing of the storage part of the model
2) embedded T4 Editor for customizing templates: http://www.devart.com/entitydeveloper/c ... ation.html
3) handy EF Code First DbContext Template: http://blogs.devart.com/dotconnect/enti ... plate.html
4) splitting a model into diagrams to improve its readability: http://blogs.devart.com/dotconnect/work ... loper.html
5) data viewing/editing: http://www.devart.com/entitydeveloper/data.html
6) visual enhancements: http://blogs.devart.com/dotconnect/visu ... r-4-1.html
7) all advanced Entity Developer functionality is available in all supported Visual Studio versions: 2008/2010/2012
8) the possibility of configuring data type mapping using Database-First approach
9) wide range of settings for naming rules for model objects
10) the possibility of synchronizing mapping of storage part when editing the conceptual part
etc.
Refer to
http://www.devart.com/entitydeveloper/
http://blogs.devart.com/dotconnect/cate ... -developer

Post Reply