New Posts New Posts RSS Feed: Fetch Local Object Count
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Fetch Local Object Count

 Post Reply Post Reply
Author
keval View Drop Down
Newbie
Newbie
Avatar

Joined: 16-Apr-2008
Location: India
Posts: 15
Post Options Post Options   Quote keval Quote  Post ReplyReply Direct Link To This Post Topic: Fetch Local Object Count
    Posted: 09-Jul-2008 at 2:47am
Hello,
 
 
How can i fetch the local object count in the entitymanager?
 
e.g. following is the statement

variable = DataSet.LocalObjectsCount;

Dataset is EntityManager
LocalObjectsCount = Counts all objects in the local data set(already loaded from database)
 
Thanks
Back to Top
keval View Drop Down
Newbie
Newbie
Avatar

Joined: 16-Apr-2008
Location: India
Posts: 15
Post Options Post Options   Quote keval Quote  Post ReplyReply Direct Link To This Post Posted: 16-Jul-2008 at 4:40am
Hello Support Team,
 
I m waiting for ur reply since a week but still no reply.
 
In case if u don't know solution then fine but reply.
 
 
Back to Top
davidklitzke View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 14-Jun-2007
Posts: 715
Post Options Post Options   Quote davidklitzke Quote  Post ReplyReply Direct Link To This Post Posted: 16-Jul-2008 at 10:47am
Use this:
 
  EntityState allStates = EntityState.Added | EntityState.Deleted | EntityState.Modified | EntityState.Unchanged;

   int totInCache = em.FindEntities(allStates).Count();

 



Edited by davidklitzke - 16-Jul-2008 at 10:52am
Back to Top
keval View Drop Down
Newbie
Newbie
Avatar

Joined: 16-Apr-2008
Location: India
Posts: 15
Post Options Post Options   Quote keval Quote  Post ReplyReply Direct Link To This Post Posted: 16-Jul-2008 at 9:52pm
Hi,
 
 
Thanks for ur reply. 
 
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down