Advertisement
Guest User

Untitled

a guest
Jan 17th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. public static WorkflowStatus Get(int id)
  2. {
  3. WorkflowStatus status;
  4. using (var db = new WorkflowDb())
  5. {
  6. status = db.WorkflowStatuses
  7. .Include("CurrentMappings")
  8. .Include("CurrentMappings.NextWorkflowStatus")
  9. .Include("NextMappings")
  10. .Include("NextMappings.CurrentWorkflowStatus")
  11. .Include("WorkQueueWorkflowStatusMaps")
  12. .Include("WorkQueueWorkflowStatusMaps.WorkQueue")
  13. .FirstOrDefault(x => x.Id == id);
  14. }
  15. return status;
  16. }
  17.  
  18. context.ContextOptions.LazyLoadingEnabled = true;
  19.  
  20. db.WorkflowStatuses.Include(s => s.childObject)
  21. .AsNoTracking()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement