Equivalent of EF Find Method and Local

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
Posts: 1
Joined: Tue 07 Oct 2014 14:09

Equivalent of EF Find Method and Local

Post by ValentinMTL » Tue 07 Oct 2014 15:03

I am considering to buy the dotConnect for MySQL and am trying to convert an existing project to it in VS2013 with EF6.

I am currently using the EF method DbSet<TEntity>.Find to find objects in a table by primary key.
The definition can be found here:

Is there an equivalent in dotConnect for MySQL?
devart seems to be using System.Data.Entity.Core.Objects.ObjectSet for tables, whereas the default EF uses System.Data.Entity.DbSet

Given this difference, Is there an equivalent of the Local property that allows the code to bypass a trip to the DB?


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

Re: Equivalent of EF Find Method and Local

Post by Shalex » Mon 13 Oct 2014 10:43

You should change a code generation template: open *.edml model, navigate to Tools > Entity Developer > Model Explorer > the Templates mode, remove or disable the EntityObject template, add the DbContext template. Save your model to regenerate the code.

For more information, refer to
http://blog.devart.com/entity-developer ... plate.html
http://blog.devart.com/entity-framework ... force.html
http://www.devart.com/dotconnect/mysql/ ... pport.html

Does this help?

Post Reply