{"action":"created","issue":{"url":"https://api.github.com/repos/aspnetboilerplate/module-zero/issues/62","labels_url":"https://api.github.com/repos/aspnetboilerplate/module-zero/issues/62/labels{/name}","comments_url":"https://api.github.com/repos/aspnetboilerplate/module-zero/issues/62/comments","events_url":"https://api.github.com/repos/aspnetboilerplate/module-zero/issues/62/events","html_url":"https://github.com/aspnetboilerplate/module-zero/issues/62","id":67151308,"number":62,"title":"Tenant still not loaded in User entity (update on #36)","user":{"login":"easyest","id":6928101,"avatar_url":"https://avatars.githubusercontent.com/u/6928101?v=3","gravatar_id":"","url":"https://api.github.com/users/easyest","html_url":"https://github.com/easyest","followers_url":"https://api.github.com/users/easyest/followers","following_url":"https://api.github.com/users/easyest/following{/other_user}","gists_url":"https://api.github.com/users/easyest/gists{/gist_id}","starred_url":"https://api.github.com/users/easyest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/easyest/subscriptions","organizations_url":"https://api.github.com/users/easyest/orgs","repos_url":"https://api.github.com/users/easyest/repos","events_url":"https://api.github.com/users/easyest/events{/privacy}","received_events_url":"https://api.github.com/users/easyest/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aspnetboilerplate/module-zero/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":{"login":"hikalkan","id":1210527,"avatar_url":"https://avatars.githubusercontent.com/u/1210527?v=3","gravatar_id":"","url":"https://api.github.com/users/hikalkan","html_url":"https://github.com/hikalkan","followers_url":"https://api.github.com/users/hikalkan/followers","following_url":"https://api.github.com/users/hikalkan/following{/other_user}","gists_url":"https://api.github.com/users/hikalkan/gists{/gist_id}","starred_url":"https://api.github.com/users/hikalkan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hikalkan/subscriptions","organizations_url":"https://api.github.com/users/hikalkan/orgs","repos_url":"https://api.github.com/users/hikalkan/repos","events_url":"https://api.github.com/users/hikalkan/events{/privacy}","received_events_url":"https://api.github.com/users/hikalkan/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2015-04-08T15:07:35Z","updated_at":"2015-04-08T17:25:15Z","closed_at":"2015-04-08T16:12:49Z","body":"I updated `ModuleZeroSampleApp` and checked again for `Tenant` property of the `User` - it is still null.\r\nPlease run the following test to see the problem:\r\n```c#\r\n    public class UserRepository_Tests : SampleProjectTestBase\r\n    {\r\n        [Fact]\r\n        public void Should_Get_User_With_Tenant()\r\n        {\r\n            var user = UsingDbContext(context => context.Users.Find((Int64)2));\r\n            var tenant = user.Tenant;\r\n            tenant.ShouldNotBe(null);\r\n        }\r\n    }\r\n```\r\n\r\nThe same result can be obtained using this test for `ModuleZero` itself:\r\n```c#\r\n        [Fact]\r\n        public void Should_Insert_And_Retrieve_User_With_Tenant()\r\n        {\r\n            var userRepository = LocalIocManager.Resolve<IRepository<User, long>>();\r\n            var tenantRepository = LocalIocManager.Resolve<IRepository<Tenant, int>>();\r\n\r\n            var tenant = tenantRepository.Insert(new Tenant(\"Testing\", \"Testing\"));\r\n            userRepository.Insert(new User\r\n            {\r\n                TenantId = tenant.Id,\r\n                UserName = \"tenancyTest\",\r\n                Name = \"Tenancy\",\r\n                Surname = \"Test\",\r\n                EmailAddress = \"testtenancy@domain.tld\",\r\n                IsEmailConfirmed = true,\r\n                Password = \"AM4OLBpptxBYmM79lGOX9egzZk3vIQU3d/gFCJzaBjAPXzYIK3tQ2N7X4fcrHtElTw==\" //123qwe\r\n            });\r\n\r\n            userRepository.FirstOrDefault(u => u.EmailAddress == \"testtenancy@domain.tld\").Tenant.ShouldNotBe(null);\r\n        }\r\n```"},"comment":{"url":"https://api.github.com/repos/aspnetboilerplate/module-zero/issues/comments/90980688","html_url":"https://github.com/aspnetboilerplate/module-zero/issues/62#issuecomment-90980688","issue_url":"https://api.github.com/repos/aspnetboilerplate/module-zero/issues/62","id":90980688,"user":{"login":"easyest","id":6928101,"avatar_url":"https://avatars.githubusercontent.com/u/6928101?v=3","gravatar_id":"","url":"https://api.github.com/users/easyest","html_url":"https://github.com/easyest","followers_url":"https://api.github.com/users/easyest/followers","following_url":"https://api.github.com/users/easyest/following{/other_user}","gists_url":"https://api.github.com/users/easyest/gists{/gist_id}","starred_url":"https://api.github.com/users/easyest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/easyest/subscriptions","organizations_url":"https://api.github.com/users/easyest/orgs","repos_url":"https://api.github.com/users/easyest/repos","events_url":"https://api.github.com/users/easyest/events{/privacy}","received_events_url":"https://api.github.com/users/easyest/received_events","type":"User","site_admin":false},"created_at":"2015-04-08T17:25:15Z","updated_at":"2015-04-08T17:25:15Z","body":"OMG. I lack words to describe my inattention - I simply missed a keyword while taking as granted that all properties are virtual..."}}