{"action":"opened","issue":{"url":"https://api.github.com/repos/dd4t/DD4T.Core/issues/17","labels_url":"https://api.github.com/repos/dd4t/DD4T.Core/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/dd4t/DD4T.Core/issues/17/comments","events_url":"https://api.github.com/repos/dd4t/DD4T.Core/issues/17/events","html_url":"https://github.com/dd4t/DD4T.Core/issues/17","id":103919031,"number":17,"title":"Determine viewmodel by inspecting the compiled Razor views","user":{"login":"quirijnslings","id":1014199,"avatar_url":"https://avatars.githubusercontent.com/u/1014199?v=3","gravatar_id":"","url":"https://api.github.com/users/quirijnslings","html_url":"https://github.com/quirijnslings","followers_url":"https://api.github.com/users/quirijnslings/followers","following_url":"https://api.github.com/users/quirijnslings/following{/other_user}","gists_url":"https://api.github.com/users/quirijnslings/gists{/gist_id}","starred_url":"https://api.github.com/users/quirijnslings/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quirijnslings/subscriptions","organizations_url":"https://api.github.com/users/quirijnslings/orgs","repos_url":"https://api.github.com/users/quirijnslings/repos","events_url":"https://api.github.com/users/quirijnslings/events{/privacy}","received_events_url":"https://api.github.com/users/quirijnslings/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-30T11:18:41Z","updated_at":"2015-08-30T11:18:41Z","closed_at":null,"body":"Currently, the view model class must be annotated with 'viewkeys'. The component templates in Tridion must have a metadata containing this viewkey. This creates interdependencies which are really not necessary.\r\nIn DXA, the viewmodels are tied to the views by simply looking at the @model directive in the views. This is done using reflection on the compiled Razor view classes. See DXA 1.1 source code.\r\nThis removes the need to configure anything on the view model classes OR the templates.\r\nI think we should copy this approach soon after 2.0beta comes out."}}