Page 1 of 1

Equivalent of EF Find Method and Local

Posted: Tue 07 Oct 2014 15:03
by ValentinMTL
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?

Thanks

Re: Equivalent of EF Find Method and Local

Posted: Mon 13 Oct 2014 10:43
by Shalex
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?