Guest User

Untitled

a guest
Jan 21st, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. public class EntityService : IEntityService
  2. {
  3. public EntityService()
  4. {
  5. _entities = new DatabaseDomainContext();
  6. }
  7.  
  8. private DatabaseDomainContext _entities;
  9. public DatabaseDomainContext Entities
  10. {
  11. get { return _entities; }
  12. set { _entities = value; }
  13. }
  14.  
  15. private EntityList<Objective> _objectives;
  16. public ObservableCollection<Objective> Objectives
  17. {
  18. get
  19. {
  20. if (_objectives == null)
  21. {
  22. var loadOp = _entities.Load(_entities.GetObjectivesQuery()/*, Callback, true*/);
  23. _objectives = new EntityList<Objective>(_entities.Objectives, loadOp.Entities);
  24. }
  25.  
  26. return _objectives;
  27. }
  28. }
  29. }
Add Comment
Please, Sign In to add comment