Devart Blog

dotConnect Team posts

JSON Support in Entity Framework v4 – v6 in dotConnect for Oracle, MySQL, and PostgreSQL

Posted by on December 8th, 2016

Recent versions of MySQL and PostgreSQL databases provide JSON functionality support. They introduced special data types, storing JSON data – json data type in MySQL (since MySQL 5.7.8), and json and jsonb data types in PostgreSQL (json introduced in PostgreSQL 9.2, and jsonb introduced in PostgreSQL 9.4).

In Oracle, some JSON-related functionality was added in version 12c. Oracle Database currently does not offer a specific data type, and you should store JSON in usual CLOB and NCLOB columns.

Among other improvements, the new versions of dotConnect for Oracle, dotConnect for MySQL, and dotConnect for PostgreSQL offer support of JSON-related functionality of these databases in Entity Framework. In Entity Framework v4, v5, and v6, you can call database-specific JSON-related functions and operators in LINQ to Entities queries.

Let’s see how to do it on a simple examples:

(more…)

Migrating Entity Framework 6 projects to Entity Framework Core 1 (Entity Framework 7)

Posted by on April 25th, 2016

For the purpose of this tutorial, we will use a test project from the “Entity Framework 6 Support for Oracle, MySQL, PostgreSQL, SQLite, DB2, and Salesforce” blog article. We will update this project so that it could be used with Entity Framework Core 1 (Entity Framework 7).

This is not a full-featured tutorial that completely describes migration of Entity Framework 6 projects to Entity Framework Core (Entity Framework 7). We will describe only several of the possible problems and solutions, which we found when migrating a simple and small project that uses only a small part of Entity Framework 6 features.

As one expects, migration from Entity Framework 6 to Entity Framework Core should have been just the following simple steps:

  • change Target Framework for projects;
  • delete old NuGet package
  • add new NuGet package
  • make some configuration changes (though one can expect some vertical compatibility between different versions of the same ORM, and consider this step unnecessary).

That should have been all the steps. However, in reality there are much more problems than one should expect. And in this article we will describe some of these problems and their solutions.

(more…)

Entity Framework Core 1 (Entity Framework 7) Support

Posted by on April 25th, 2016

Entity Framework Core 1, formerly known as Entity Framework 7 (hereafter also called EF Core or EF7), is supported in Devart ADO.NET provider product line. It is supported in providers for relational databases: Oracle, MySQL, PostgreSQL, SQLite, DB2, and provides for cloud data sources, such as Salesforce, Dynamics CRM, SugarCRM, Zoho CRM, QuickBooks, FreshBooks, MailChimp, ExactTarget, Bigcommerce, Magento. Currently our providers support Entity Framework Core Release Candidate 1. Entity Framework Core support is currently in public beta stage. It is implemented for the full .NET Framework platform – .NET Framework 4.5.1 and higher.

We need to mention first that Entity Framework Core 1 (Entity Framework 7) – is a completely new ORM, which inherited only the name, LINQ support, and some classes with the same or similar names from Entity Framework 6, and even these classes often have incomplete functionality in comparison to their Entity Framework 6 counterparts. You can find more information about EF Core compatibility with EF6 and issues of migration in other our article, “Migrating Entity Framework 6 projects to Entity Framework Core 1 (Entity Framework 7)”. Additionally you can study Entity Framework Core features in its official documentation.

(more…)

Entity Developer 6.0 – New ORM Designer for Telerik Data Access

Posted by on March 24th, 2016

As Telerik announced a few months ago in their blog, they deprecated visual designer and Visual Studio tools for their Data Access ORM (formerly, OpenAccess ORM) – a very popular and powerful data access framework. Since the Q2 2015 version, Data Access NuGet packages work only with code-only mapping. The deprecated Telerik Data Access Visual Designer was very popular among Telerik Data Access users, and there are a lot of user posts and comments with demands for a visual model designer for this ORM on different websites.

Seeing these requests, Devart decided to support Telerik Data Access in our ORM designer – Entity Developer. Entity Developer is a powerful ORM designer for several popular ORM solutions, and now we are glad to announce that it supports Telerik Data Access too!

Entity Developer provides full support for Fluent Data Access mapping – it supports all kinds of inheritances, structures, composite IDs, etc. Our Designer supports all the familiar visual designer features, Telerik Data Access users are accustomed to and many more, and it can be used both as seamlessly integrated Visual Studio add-in and as a standalone application.
(more…)

MySQL Case Sensitive Search in Entity Framework

Posted by on February 24th, 2016

A high level abstraction provided by Entity Framework sometimes challenges developers in accessing a full set of features available via native SQL of a particular database server. This article will help you to cope with usage of collation in MySQL to control case sensitivity settings in generated queries.

Collation defines an order through the process of comparing two given character strings and deciding which should come before the other.
(more…)

String Enum Representation in Entity Developer

Posted by on November 17th, 2014

This article explains and demonstrates mapping a string representation of enum to string fields in a database in Entity Developer. The sample, demonstrated in this post, is included into our NHibernate Mapping Samples application, described in the corresponding NHibernate Mapping Samples blog article. It is named ‘Enum Type Property'; however, other samples from this application probably prove to become useful for NHibernate users both beginners and professionals, so we recommend downloading it for everyone who develop NHibernate applications.

The problem with mapping enum types in NHibernate is that NHibernate can map enum type values only to the numeric columns in database without additional manipulations. However, when enum values are stored in database as strings, NHibernate requires the user to perform some additional actions.
(more…)

Oracle 12c Support and More New Features in New Versions of Devart Products

Posted by on October 17th, 2013

Devart releases new versions of its products: LinqConnect ORM solution, dotConnect ADO.NET data providers, and ORM designer – Entity Developer. The main new feature in dotConnect for Oracle, LinqConnect, and Entity Developer is the support for the latest release of Oracle Database – Oracle 12c. Additionally, dotConnect data providers offer you Sync Framework support, improved PgSqlDump component, load balancing support in dotConnect for MySQL, and other features. This article describes the new features in details.
(more…)

Model-Defined Functions in Entity Developer

Posted by on September 9th, 2013

This article explains how the support of Entity Framework Model-Defined Functions is implemented in Entity Developer ORM Designer and illustrates creating such methods on simple examples. The Entity model for Entity Developer used in the samples below can be downloaded here.

A model-defined function is a function, declared in the conceptual part of the model (csdl) and mapped to Entity SQL queries instead of usual mapping to a stored function from the storage part (like Function Import). When executing such a method, an Entity SQL query, specified as the defining expression of the method, is executed. The method can have zero or more parameters and method parameters are referenced directly by Name in the DefiningExpression, no parameter denoting prefix (like @) is used. This means you must be careful to choose parameter names that don’t coincide with other identifiers you need to use in the eSQL expression. Such methods support only IN bound parameters. The method must have a return type and return type can be any of the following: (more…)

Enhanced Entity Framework Spatials support for Oracle, MySQL and PostgreSQL

Posted by on July 18th, 2013

Entity Framework v5 and v6 support spatial data types. They are represented as two DbGeometry and DbGeography data types from System.Data.Entity.dll in .NET Framework 4.5 (Entity Framework 5) or from EntityFramework.dll (Entity Framework 6). We have already supported Entity Framework Spatials for Oracle database (see Using Entity Framework Spatials with Oracle Spatial and SharpMap). In the new versions of our providers we have improved Entity Framework Spatials support for Oracle and added spatials support for MySQL and PostgreSQL.
(more…)

Entity Framework 6 Support for Oracle, MySQL, PostgreSQL, SQLite, DB2 and Salesforce

Posted by on January 17th, 2013
Article was updated on December 5th, 2013

Entity Framework 6 Alpha 2 support is implemented in Devart ADO.NET providers: dotConnect for Oracle, dotConnect for MySQL, dotConnect for PostgreSQL, dotConnect for SQLite, dotConnect for DB2 and dotConnect for Salesforce. You need to download the corresponding Entity Framework NuGet package to use it in your applications. You can read about Entity Framework 6 features in the corresponding MSDN articles. (more…)