{"action":"created","issue":{"url":"https://api.github.com/repos/CECS-491A/core/issues/12","repository_url":"https://api.github.com/repos/CECS-491A/core","labels_url":"https://api.github.com/repos/CECS-491A/core/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/CECS-491A/core/issues/12/comments","events_url":"https://api.github.com/repos/CECS-491A/core/issues/12/events","html_url":"https://github.com/CECS-491A/core/issues/12","id":387518778,"node_id":"MDU6SXNzdWUzODc1MTg3Nzg=","number":12,"title":"Database logic in the service layer","user":{"login":"Luke-Clements","id":36176436,"node_id":"MDQ6VXNlcjM2MTc2NDM2","avatar_url":"https://avatars2.githubusercontent.com/u/36176436?v=4","gravatar_id":"","url":"https://api.github.com/users/Luke-Clements","html_url":"https://github.com/Luke-Clements","followers_url":"https://api.github.com/users/Luke-Clements/followers","following_url":"https://api.github.com/users/Luke-Clements/following{/other_user}","gists_url":"https://api.github.com/users/Luke-Clements/gists{/gist_id}","starred_url":"https://api.github.com/users/Luke-Clements/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Luke-Clements/subscriptions","organizations_url":"https://api.github.com/users/Luke-Clements/orgs","repos_url":"https://api.github.com/users/Luke-Clements/repos","events_url":"https://api.github.com/users/Luke-Clements/events{/privacy}","received_events_url":"https://api.github.com/users/Luke-Clements/received_events","type":"User","site_admin":false},"labels":[{"id":1046052106,"node_id":"MDU6TGFiZWwxMDQ2MDUyMTA2","url":"https://api.github.com/repos/CECS-491A/core/labels/invalid","name":"invalid","color":"e4e669","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-12-04T23:02:25Z","updated_at":"2018-12-04T23:39:33Z","closed_at":null,"author_association":"COLLABORATOR","body":"Having the database logic in the service layer how it currently is means that the code will not be reusable with anything other than entity framework. The DAL should have this functionality, and the service layer should get an instance of the DAO that is needed and then use the functionality attached to that DAO.\r\n\r\nProblem(there may be other places as well):\r\nhttps://github.com/CECS-491A/core/blob/refactor-architecture-backend/Backend/ServiceLayer/Services/UserService.cs\r\n\r\nExample:\r\nhttps://docs.microsoft.com/en-us/aspnet/mvc/overview/older-versions-1/models-data/validating-with-a-service-layer-cs#decoupling-the-service-layer"},"comment":{"url":"https://api.github.com/repos/CECS-491A/core/issues/comments/444301780","html_url":"https://github.com/CECS-491A/core/issues/12#issuecomment-444301780","issue_url":"https://api.github.com/repos/CECS-491A/core/issues/12","id":444301780,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NDMwMTc4MA==","user":{"login":"alfredovargasjr","id":30332115,"node_id":"MDQ6VXNlcjMwMzMyMTE1","avatar_url":"https://avatars2.githubusercontent.com/u/30332115?v=4","gravatar_id":"","url":"https://api.github.com/users/alfredovargasjr","html_url":"https://github.com/alfredovargasjr","followers_url":"https://api.github.com/users/alfredovargasjr/followers","following_url":"https://api.github.com/users/alfredovargasjr/following{/other_user}","gists_url":"https://api.github.com/users/alfredovargasjr/gists{/gist_id}","starred_url":"https://api.github.com/users/alfredovargasjr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alfredovargasjr/subscriptions","organizations_url":"https://api.github.com/users/alfredovargasjr/orgs","repos_url":"https://api.github.com/users/alfredovargasjr/repos","events_url":"https://api.github.com/users/alfredovargasjr/events{/privacy}","received_events_url":"https://api.github.com/users/alfredovargasjr/received_events","type":"User","site_admin":false},"created_at":"2018-12-04T23:39:33Z","updated_at":"2018-12-04T23:39:33Z","author_association":"COLLABORATOR","body":"i've been thinking alot about the repository pattern, but the more read about it it seems like it is not need cause ef6 provides alot of that funtionality. But it can still be used to isolate the db context between operations and entities using it. I'll look more into it."}}
{"actor":{"display_login":"alfredovargasjr"}}