{"action":"created","issue":{"url":"https://api.github.com/repos/aspnetboilerplate/aspnetboilerplate/issues/712","repository_url":"https://api.github.com/repos/aspnetboilerplate/aspnetboilerplate","labels_url":"https://api.github.com/repos/aspnetboilerplate/aspnetboilerplate/issues/712/labels{/name}","comments_url":"https://api.github.com/repos/aspnetboilerplate/aspnetboilerplate/issues/712/comments","events_url":"https://api.github.com/repos/aspnetboilerplate/aspnetboilerplate/issues/712/events","html_url":"https://github.com/aspnetboilerplate/aspnetboilerplate/issues/712","id":118159913,"number":712,"title":"Custom repositories should override the default repositories","user":{"login":"hikalkan","id":1210527,"avatar_url":"https://avatars1.githubusercontent.com/u/1210527?v=4","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},"labels":[{"id":113688938,"url":"https://api.github.com/repos/aspnetboilerplate/aspnetboilerplate/labels/cancelled","name":"cancelled","color":"fad8c7","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":20,"created_at":"2015-11-21T01:27:58Z","updated_at":"2018-03-26T18:05:44Z","closed_at":"2016-09-19T12:27:12Z","author_association":"OWNER","body":"We can create custom repositories easily. But even we create custom repository for a Person entitiy, we can still inject `IRepository<Person>`. That's very good. But think that we overrided Delete method on the custom repository and changed delete logic a bit. What happens if we still use `IRepository<Person>` instead of custom `IPersonRepository`? Delete method will work as before. So, there will be 2 different Delete method implementations for same entity. This is dangerous!\n\nSo, while registering default repositories, we can check if there is a custom implementation and register `IRepository<TEntity>` as the custom repository.\n"},"comment":{"url":"https://api.github.com/repos/aspnetboilerplate/aspnetboilerplate/issues/comments/376258476","html_url":"https://github.com/aspnetboilerplate/aspnetboilerplate/issues/712#issuecomment-376258476","issue_url":"https://api.github.com/repos/aspnetboilerplate/aspnetboilerplate/issues/712","id":376258476,"user":{"login":"acjh","id":14091939,"avatar_url":"https://avatars0.githubusercontent.com/u/14091939?v=4","gravatar_id":"","url":"https://api.github.com/users/acjh","html_url":"https://github.com/acjh","followers_url":"https://api.github.com/users/acjh/followers","following_url":"https://api.github.com/users/acjh/following{/other_user}","gists_url":"https://api.github.com/users/acjh/gists{/gist_id}","starred_url":"https://api.github.com/users/acjh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acjh/subscriptions","organizations_url":"https://api.github.com/users/acjh/orgs","repos_url":"https://api.github.com/users/acjh/repos","events_url":"https://api.github.com/users/acjh/events{/privacy}","received_events_url":"https://api.github.com/users/acjh/received_events","type":"User","site_admin":false},"created_at":"2018-03-26T18:05:44Z","updated_at":"2018-03-26T18:05:44Z","author_association":"CONTRIBUTOR","body":"Ah, it's:\r\n\r\n```c#\r\npublic class TaskAppRepositoryBase<TEntity> : TaskAppRepositoryBase<TEntity, int>,\r\n                                              IRepository<TEntity>\r\n        where TEntity : class, IEntity<int>\r\n```\r\n\r\nNot:\r\n\r\n```c#\r\npublic class TaskAppRepositoryBase<TEntity> : TaskAppRepositoryBase<TEntity, int>\r\n        where TEntity : class, IRepository<TEntity>\r\n```"}}
{"actor":{"display_login":"acjh"}}