Quantcast
Channel: entityframework Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1793

New Post: load master and refresh details,how to?

$
0
0
table a,table b
first a.load();
then find a with include "b"

here i update b with sql in sqlserver managerment
if I use objectContext.Refresh(RefreshMode.StoreWins, b.Local); I can get the new b items with a;

I use the generic repository,in my find fuction my code like :
           var query = ctx.Set<T>().Where(t => true);
            foreach (string include in includes)
            {
                query = query.Include(include);
                query.Load();
            }
            query.Load();
            result.Entities = query.Where(filter.Compile());
always not refresh the b object from database.

Viewing all articles
Browse latest Browse all 1793

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>