{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/EntityFramework/issues/3797","repository_url":"https://api.github.com/repos/aspnet/EntityFramework","labels_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/3797/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/3797/comments","events_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/3797/events","html_url":"https://github.com/aspnet/EntityFramework/issues/3797","id":117834244,"number":3797,"title":"Lazy Loading","user":{"login":"AndiRudi","id":6254862,"avatar_url":"https://avatars.githubusercontent.com/u/6254862?v=3","gravatar_id":"","url":"https://api.github.com/users/AndiRudi","html_url":"https://github.com/AndiRudi","followers_url":"https://api.github.com/users/AndiRudi/followers","following_url":"https://api.github.com/users/AndiRudi/following{/other_user}","gists_url":"https://api.github.com/users/AndiRudi/gists{/gist_id}","starred_url":"https://api.github.com/users/AndiRudi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndiRudi/subscriptions","organizations_url":"https://api.github.com/users/AndiRudi/orgs","repos_url":"https://api.github.com/users/AndiRudi/repos","events_url":"https://api.github.com/users/AndiRudi/events{/privacy}","received_events_url":"https://api.github.com/users/AndiRudi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aspnet/EntityFramework/labels/enhancement","name":"enhancement","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/aspnet/EntityFramework/milestones/2","html_url":"https://github.com/aspnet/EntityFramework/milestones/Backlog","labels_url":"https://api.github.com/repos/aspnet/EntityFramework/milestones/2/labels","id":648040,"number":2,"title":"Backlog","description":"This release is used to track work items that have been approved but are not scheduled a specific release.\r\n<!--\r\n@huboard:{\"order\":100}\r\n-->","creator":{"login":"bricelam","id":1226749,"avatar_url":"https://avatars.githubusercontent.com/u/1226749?v=3","gravatar_id":"","url":"https://api.github.com/users/bricelam","html_url":"https://github.com/bricelam","followers_url":"https://api.github.com/users/bricelam/followers","following_url":"https://api.github.com/users/bricelam/following{/other_user}","gists_url":"https://api.github.com/users/bricelam/gists{/gist_id}","starred_url":"https://api.github.com/users/bricelam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bricelam/subscriptions","organizations_url":"https://api.github.com/users/bricelam/orgs","repos_url":"https://api.github.com/users/bricelam/repos","events_url":"https://api.github.com/users/bricelam/events{/privacy}","received_events_url":"https://api.github.com/users/bricelam/received_events","type":"User","site_admin":false},"open_issues":284,"closed_issues":19,"state":"open","created_at":"2014-05-03T18:58:28Z","updated_at":"2016-02-12T20:02:08Z","due_on":null,"closed_at":null},"comments":46,"created_at":"2015-11-19T15:13:04Z","updated_at":"2016-02-14T07:52:16Z","closed_at":null,"body":"Hi,\r\n\r\ni was wondering if I am the only one that thinks EF7 is useless without Lazy Loading? Or do I do something wrong? Lets just consider a simple scenario when a course provider cancels a course on a course booking plattform written in MVC. \r\n\r\nThe user calls courses/cancel/1. The action would get the course and call cancel method like here\r\n\r\n    Course course = context.Courses.SingleOrDefault(c => c.Id = 1);\r\n    course.Cancel();\r\n\r\nThe cancel method then needs to cancel each booking on the course so it would do something like this\r\n\r\n    foreach(Booking booking in this.Bookings)\r\n    {\r\n        booking.Cancel();\r\n    }\r\n\r\nThe booking in turn would refund the transaction\r\n\r\n    foreach(Transaction transaction in this.Transactions)\r\n    {\r\n        transaction.Refund();\r\n    }\r\n\r\nSo for this to work, lazy loading is needed?! (The solution would be to eager load all the data on the controllers action method. But I do not know what will be needed from the controller?)\r\n\r\nI'd appreciate any information on that.\r\n\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/aspnet/EntityFramework/issues/comments/183845043","html_url":"https://github.com/aspnet/EntityFramework/issues/3797#issuecomment-183845043","issue_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/3797","id":183845043,"user":{"login":"Serjster","id":3606218,"avatar_url":"https://avatars.githubusercontent.com/u/3606218?v=3","gravatar_id":"","url":"https://api.github.com/users/Serjster","html_url":"https://github.com/Serjster","followers_url":"https://api.github.com/users/Serjster/followers","following_url":"https://api.github.com/users/Serjster/following{/other_user}","gists_url":"https://api.github.com/users/Serjster/gists{/gist_id}","starred_url":"https://api.github.com/users/Serjster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Serjster/subscriptions","organizations_url":"https://api.github.com/users/Serjster/orgs","repos_url":"https://api.github.com/users/Serjster/repos","events_url":"https://api.github.com/users/Serjster/events{/privacy}","received_events_url":"https://api.github.com/users/Serjster/received_events","type":"User","site_admin":false},"created_at":"2016-02-14T07:52:16Z","updated_at":"2016-02-14T07:52:16Z","body":"Certainly need Lazy Loading... how do you propose doing DDD without it?"}}