{"action":"created","comment":{"url":"https://api.github.com/repos/Wolox/netcore-bootstrap/pulls/comments/170356615","pull_request_review_id":99037044,"id":170356615,"diff_hunk":"@@ -0,0 +1,38 @@\n+using System;\n+using System.Collections.Generic;\n+using System.Linq;\n+using System.Linq.Expressions;\n+using Microsoft.EntityFrameworkCore;\n+using NetCoreBootstrap.Persistance.Interfaces;\n+\n+namespace NetCoreBootstrap.Persistance.Repositories\n+{\n+    public class Repository<T> : IRepository<T> where T : class\n+    {\n+        protected readonly DbContext _context;\n+\n+        public Repository(DbContext context) => _context = context;\n+\n+        public void Add(T entity) => _context.Set<T>().Add(entity);\n+\n+        public void AddRange(IEnumerable<T> entities) => _context.Set<T>().AddRange(entities);\n+\n+        public T Get(int id) => _context.Set<T>().Find(id);\n+\n+        public IEnumerable<T> GetAll() => _context.Set<T>().ToList();\n+\n+        public void Remove(T entity) => _context.Set<T>().Remove(entity);\n+\n+        public void RemoveRange(IEnumerable<T> entities) => _context.Set<T>().RemoveRange(entities);\n+        \n+        public IEnumerable<T> Find(Expression<Func<T, bool>> predicate) => _context.Set<T>().Where(predicate);\n+        \n+        public void UpdateRange(IEnumerable<T> entities) => _context.Set<T>().UpdateRange(entities);\n+\n+        public bool Update(T entity)\n+        {\n+            var updateResult = _context.Set<T>().Update(entity);\n+            return updateResult.State == EntityState.Modified;\n+        }\n+    }\n+}","path":"src/Persistance/Repositories/Repository.cs","position":38,"original_position":38,"commit_id":"987773bfc4ce50ea2dba24e556d37147f3589a9e","original_commit_id":"987773bfc4ce50ea2dba24e556d37147f3589a9e","user":{"login":"gussiciliano","id":19696200,"avatar_url":"https://avatars0.githubusercontent.com/u/19696200?v=4","gravatar_id":"","url":"https://api.github.com/users/gussiciliano","html_url":"https://github.com/gussiciliano","followers_url":"https://api.github.com/users/gussiciliano/followers","following_url":"https://api.github.com/users/gussiciliano/following{/other_user}","gists_url":"https://api.github.com/users/gussiciliano/gists{/gist_id}","starred_url":"https://api.github.com/users/gussiciliano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gussiciliano/subscriptions","organizations_url":"https://api.github.com/users/gussiciliano/orgs","repos_url":"https://api.github.com/users/gussiciliano/repos","events_url":"https://api.github.com/users/gussiciliano/events{/privacy}","received_events_url":"https://api.github.com/users/gussiciliano/received_events","type":"User","site_admin":false},"body":"add eof","created_at":"2018-02-23T20:14:59Z","updated_at":"2018-02-23T20:19:46Z","html_url":"https://github.com/Wolox/netcore-bootstrap/pull/68#discussion_r170356615","pull_request_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/pulls/68","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/Wolox/netcore-bootstrap/pulls/comments/170356615"},"html":{"href":"https://github.com/Wolox/netcore-bootstrap/pull/68#discussion_r170356615"},"pull_request":{"href":"https://api.github.com/repos/Wolox/netcore-bootstrap/pulls/68"}}},"pull_request":{"url":"https://api.github.com/repos/Wolox/netcore-bootstrap/pulls/68","id":171067951,"html_url":"https://github.com/Wolox/netcore-bootstrap/pull/68","diff_url":"https://github.com/Wolox/netcore-bootstrap/pull/68.diff","patch_url":"https://github.com/Wolox/netcore-bootstrap/pull/68.patch","issue_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/issues/68","number":68,"state":"open","locked":false,"title":"New repository structure","user":{"login":"truccomarcos","id":16925524,"avatar_url":"https://avatars0.githubusercontent.com/u/16925524?v=4","gravatar_id":"","url":"https://api.github.com/users/truccomarcos","html_url":"https://github.com/truccomarcos","followers_url":"https://api.github.com/users/truccomarcos/followers","following_url":"https://api.github.com/users/truccomarcos/following{/other_user}","gists_url":"https://api.github.com/users/truccomarcos/gists{/gist_id}","starred_url":"https://api.github.com/users/truccomarcos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/truccomarcos/subscriptions","organizations_url":"https://api.github.com/users/truccomarcos/orgs","repos_url":"https://api.github.com/users/truccomarcos/repos","events_url":"https://api.github.com/users/truccomarcos/events{/privacy}","received_events_url":"https://api.github.com/users/truccomarcos/received_events","type":"User","site_admin":false},"body":"### Summary\r\n- Changed project structure to fit new Repository Pattern\r\n\r\n### Comments\r\n- Some files need to be deleted after the PR is corrected, because they exemplify how the project/tests would work.","created_at":"2018-02-23T17:09:41Z","updated_at":"2018-02-23T20:19:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2c75114aa5ed5ab77d4521ff474c08539aaa2fa9","assignee":{"login":"gussiciliano","id":19696200,"avatar_url":"https://avatars0.githubusercontent.com/u/19696200?v=4","gravatar_id":"","url":"https://api.github.com/users/gussiciliano","html_url":"https://github.com/gussiciliano","followers_url":"https://api.github.com/users/gussiciliano/followers","following_url":"https://api.github.com/users/gussiciliano/following{/other_user}","gists_url":"https://api.github.com/users/gussiciliano/gists{/gist_id}","starred_url":"https://api.github.com/users/gussiciliano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gussiciliano/subscriptions","organizations_url":"https://api.github.com/users/gussiciliano/orgs","repos_url":"https://api.github.com/users/gussiciliano/repos","events_url":"https://api.github.com/users/gussiciliano/events{/privacy}","received_events_url":"https://api.github.com/users/gussiciliano/received_events","type":"User","site_admin":false},"assignees":[{"login":"gussiciliano","id":19696200,"avatar_url":"https://avatars0.githubusercontent.com/u/19696200?v=4","gravatar_id":"","url":"https://api.github.com/users/gussiciliano","html_url":"https://github.com/gussiciliano","followers_url":"https://api.github.com/users/gussiciliano/followers","following_url":"https://api.github.com/users/gussiciliano/following{/other_user}","gists_url":"https://api.github.com/users/gussiciliano/gists{/gist_id}","starred_url":"https://api.github.com/users/gussiciliano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gussiciliano/subscriptions","organizations_url":"https://api.github.com/users/gussiciliano/orgs","repos_url":"https://api.github.com/users/gussiciliano/repos","events_url":"https://api.github.com/users/gussiciliano/events{/privacy}","received_events_url":"https://api.github.com/users/gussiciliano/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/pulls/68/commits","review_comments_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/pulls/68/comments","review_comment_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/issues/68/comments","statuses_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/statuses/987773bfc4ce50ea2dba24e556d37147f3589a9e","head":{"label":"Wolox:new-repository-structure","ref":"new-repository-structure","sha":"987773bfc4ce50ea2dba24e556d37147f3589a9e","user":{"login":"Wolox","id":1046241,"avatar_url":"https://avatars3.githubusercontent.com/u/1046241?v=4","gravatar_id":"","url":"https://api.github.com/users/Wolox","html_url":"https://github.com/Wolox","followers_url":"https://api.github.com/users/Wolox/followers","following_url":"https://api.github.com/users/Wolox/following{/other_user}","gists_url":"https://api.github.com/users/Wolox/gists{/gist_id}","starred_url":"https://api.github.com/users/Wolox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wolox/subscriptions","organizations_url":"https://api.github.com/users/Wolox/orgs","repos_url":"https://api.github.com/users/Wolox/repos","events_url":"https://api.github.com/users/Wolox/events{/privacy}","received_events_url":"https://api.github.com/users/Wolox/received_events","type":"Organization","site_admin":false},"repo":{"id":95707667,"name":"netcore-bootstrap","full_name":"Wolox/netcore-bootstrap","owner":{"login":"Wolox","id":1046241,"avatar_url":"https://avatars3.githubusercontent.com/u/1046241?v=4","gravatar_id":"","url":"https://api.github.com/users/Wolox","html_url":"https://github.com/Wolox","followers_url":"https://api.github.com/users/Wolox/followers","following_url":"https://api.github.com/users/Wolox/following{/other_user}","gists_url":"https://api.github.com/users/Wolox/gists{/gist_id}","starred_url":"https://api.github.com/users/Wolox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wolox/subscriptions","organizations_url":"https://api.github.com/users/Wolox/orgs","repos_url":"https://api.github.com/users/Wolox/repos","events_url":"https://api.github.com/users/Wolox/events{/privacy}","received_events_url":"https://api.github.com/users/Wolox/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Wolox/netcore-bootstrap","description":"Kickoff for NetCore applications using EntityFramework.","fork":false,"url":"https://api.github.com/repos/Wolox/netcore-bootstrap","forks_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/forks","keys_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/teams","hooks_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/hooks","issue_events_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/issues/events{/number}","events_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/events","assignees_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/assignees{/user}","branches_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/branches{/branch}","tags_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/tags","blobs_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/git/refs{/sha}","trees_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/statuses/{sha}","languages_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/languages","stargazers_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/stargazers","contributors_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/contributors","subscribers_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/subscribers","subscription_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/subscription","commits_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/commits{/sha}","git_commits_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/git/commits{/sha}","comments_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/comments{/number}","issue_comment_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/issues/comments{/number}","contents_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/contents/{+path}","compare_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/merges","archive_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/downloads","issues_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/issues{/number}","pulls_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/pulls{/number}","milestones_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/milestones{/number}","notifications_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/labels{/name}","releases_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/releases{/id}","deployments_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/deployments","created_at":"2017-06-28T20:12:10Z","updated_at":"2017-09-13T18:11:02Z","pushed_at":"2018-02-23T17:09:41Z","git_url":"git://github.com/Wolox/netcore-bootstrap.git","ssh_url":"git@github.com:Wolox/netcore-bootstrap.git","clone_url":"https://github.com/Wolox/netcore-bootstrap.git","svn_url":"https://github.com/Wolox/netcore-bootstrap","homepage":"","size":8862,"stargazers_count":5,"watchers_count":5,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":6,"watchers":5,"default_branch":"master"}},"base":{"label":"Wolox:master","ref":"master","sha":"91b9bccd449a51ca07c0595099da3ed9154208f8","user":{"login":"Wolox","id":1046241,"avatar_url":"https://avatars3.githubusercontent.com/u/1046241?v=4","gravatar_id":"","url":"https://api.github.com/users/Wolox","html_url":"https://github.com/Wolox","followers_url":"https://api.github.com/users/Wolox/followers","following_url":"https://api.github.com/users/Wolox/following{/other_user}","gists_url":"https://api.github.com/users/Wolox/gists{/gist_id}","starred_url":"https://api.github.com/users/Wolox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wolox/subscriptions","organizations_url":"https://api.github.com/users/Wolox/orgs","repos_url":"https://api.github.com/users/Wolox/repos","events_url":"https://api.github.com/users/Wolox/events{/privacy}","received_events_url":"https://api.github.com/users/Wolox/received_events","type":"Organization","site_admin":false},"repo":{"id":95707667,"name":"netcore-bootstrap","full_name":"Wolox/netcore-bootstrap","owner":{"login":"Wolox","id":1046241,"avatar_url":"https://avatars3.githubusercontent.com/u/1046241?v=4","gravatar_id":"","url":"https://api.github.com/users/Wolox","html_url":"https://github.com/Wolox","followers_url":"https://api.github.com/users/Wolox/followers","following_url":"https://api.github.com/users/Wolox/following{/other_user}","gists_url":"https://api.github.com/users/Wolox/gists{/gist_id}","starred_url":"https://api.github.com/users/Wolox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wolox/subscriptions","organizations_url":"https://api.github.com/users/Wolox/orgs","repos_url":"https://api.github.com/users/Wolox/repos","events_url":"https://api.github.com/users/Wolox/events{/privacy}","received_events_url":"https://api.github.com/users/Wolox/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Wolox/netcore-bootstrap","description":"Kickoff for NetCore applications using EntityFramework.","fork":false,"url":"https://api.github.com/repos/Wolox/netcore-bootstrap","forks_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/forks","keys_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/teams","hooks_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/hooks","issue_events_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/issues/events{/number}","events_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/events","assignees_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/assignees{/user}","branches_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/branches{/branch}","tags_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/tags","blobs_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/git/refs{/sha}","trees_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/statuses/{sha}","languages_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/languages","stargazers_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/stargazers","contributors_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/contributors","subscribers_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/subscribers","subscription_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/subscription","commits_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/commits{/sha}","git_commits_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/git/commits{/sha}","comments_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/comments{/number}","issue_comment_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/issues/comments{/number}","contents_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/contents/{+path}","compare_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/merges","archive_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/downloads","issues_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/issues{/number}","pulls_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/pulls{/number}","milestones_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/milestones{/number}","notifications_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/labels{/name}","releases_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/releases{/id}","deployments_url":"https://api.github.com/repos/Wolox/netcore-bootstrap/deployments","created_at":"2017-06-28T20:12:10Z","updated_at":"2017-09-13T18:11:02Z","pushed_at":"2018-02-23T17:09:41Z","git_url":"git://github.com/Wolox/netcore-bootstrap.git","ssh_url":"git@github.com:Wolox/netcore-bootstrap.git","clone_url":"https://github.com/Wolox/netcore-bootstrap.git","svn_url":"https://github.com/Wolox/netcore-bootstrap","homepage":"","size":8862,"stargazers_count":5,"watchers_count":5,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":6,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Wolox/netcore-bootstrap/pulls/68"},"html":{"href":"https://github.com/Wolox/netcore-bootstrap/pull/68"},"issue":{"href":"https://api.github.com/repos/Wolox/netcore-bootstrap/issues/68"},"comments":{"href":"https://api.github.com/repos/Wolox/netcore-bootstrap/issues/68/comments"},"review_comments":{"href":"https://api.github.com/repos/Wolox/netcore-bootstrap/pulls/68/comments"},"review_comment":{"href":"https://api.github.com/repos/Wolox/netcore-bootstrap/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Wolox/netcore-bootstrap/pulls/68/commits"},"statuses":{"href":"https://api.github.com/repos/Wolox/netcore-bootstrap/statuses/987773bfc4ce50ea2dba24e556d37147f3589a9e"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"gussiciliano"}}