{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/EntityFramework/issues/8434","repository_url":"https://api.github.com/repos/aspnet/EntityFramework","labels_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/8434/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/8434/comments","events_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/8434/events","html_url":"https://github.com/aspnet/EntityFramework/issues/8434","id":227670716,"number":8434,"title":"Main Context File is too big","user":{"login":"JuanIrigoyen","id":4987574,"avatar_url":"https://avatars2.githubusercontent.com/u/4987574?v=3","gravatar_id":"","url":"https://api.github.com/users/JuanIrigoyen","html_url":"https://github.com/JuanIrigoyen","followers_url":"https://api.github.com/users/JuanIrigoyen/followers","following_url":"https://api.github.com/users/JuanIrigoyen/following{/other_user}","gists_url":"https://api.github.com/users/JuanIrigoyen/gists{/gist_id}","starred_url":"https://api.github.com/users/JuanIrigoyen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuanIrigoyen/subscriptions","organizations_url":"https://api.github.com/users/JuanIrigoyen/orgs","repos_url":"https://api.github.com/users/JuanIrigoyen/repos","events_url":"https://api.github.com/users/JuanIrigoyen/events{/privacy}","received_events_url":"https://api.github.com/users/JuanIrigoyen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-05-10T12:56:45Z","updated_at":"2017-05-11T15:20:07Z","closed_at":null,"body":"When you work with models with many Entities and the context file is too big I have some problems when I try to modify the file. \r\n\r\nMany times Visual Studio is blocked and closed when I work with the context file. I can´t not use Resharper or Coderush with this file because it´s completely impossible to work. I need to add more files but every time is more difficult by the size of the file, I will have to start to edit it in the notepad or another editor, but I don´t have intellisence and is very difficult.\r\n\r\nI think that a good approximation is separate the configuration of the entities into different files class on the OnModelCreating method.\r\n\r\n### Steps to reproduce\r\nCreate one model with more than 22000 lines of code.\r\n\r\n### Further technical details\r\nEF Core version: 1.1\r\nDatabase Provider: (Microsoft.EntityFrameworkCore.SqlServer)\r\nOperating system: Windows 10 Pro\r\nIDE: (Visual Studio 2017)\r\nComputer. Intel Core I7 - 6700 HQ - 256 SSD Hard Drive\r\n"},"comment":{"url":"https://api.github.com/repos/aspnet/EntityFramework/issues/comments/300823056","html_url":"https://github.com/aspnet/EntityFramework/issues/8434#issuecomment-300823056","issue_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/8434","id":300823056,"user":{"login":"lajones","id":1915927,"avatar_url":"https://avatars1.githubusercontent.com/u/1915927?v=3","gravatar_id":"","url":"https://api.github.com/users/lajones","html_url":"https://github.com/lajones","followers_url":"https://api.github.com/users/lajones/followers","following_url":"https://api.github.com/users/lajones/following{/other_user}","gists_url":"https://api.github.com/users/lajones/gists{/gist_id}","starred_url":"https://api.github.com/users/lajones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lajones/subscriptions","organizations_url":"https://api.github.com/users/lajones/orgs","repos_url":"https://api.github.com/users/lajones/repos","events_url":"https://api.github.com/users/lajones/events{/privacy}","received_events_url":"https://api.github.com/users/lajones/received_events","type":"User","site_admin":false},"created_at":"2017-05-11T15:20:07Z","updated_at":"2017-05-11T15:20:07Z","body":"@JuanIrigoyen I would echo what @ErikEJ said - you can choose which schemas and/or tables to put in any one model - so you could have multiple models each representing a smaller part of the overall database. Also it may help a little to use the `-DataAnnotations` flag - wherever possible that will replace fluent API in the context class with annotations in the individual entity classes."}}
{"actor":{"display_login":"lajones"}}