{"action":"created","issue":{"url":"https://api.github.com/repos/melnyk-a/Cinema/issues/10","repository_url":"https://api.github.com/repos/melnyk-a/Cinema","labels_url":"https://api.github.com/repos/melnyk-a/Cinema/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/melnyk-a/Cinema/issues/10/comments","events_url":"https://api.github.com/repos/melnyk-a/Cinema/issues/10/events","html_url":"https://github.com/melnyk-a/Cinema/issues/10","id":372345173,"node_id":"MDU6SXNzdWUzNzIzNDUxNzM=","number":10,"title":"Update-Migration некорректное расположение базы","user":{"login":"melnyk-a","id":35136814,"node_id":"MDQ6VXNlcjM1MTM2ODE0","avatar_url":"https://avatars0.githubusercontent.com/u/35136814?v=4","gravatar_id":"","url":"https://api.github.com/users/melnyk-a","html_url":"https://github.com/melnyk-a","followers_url":"https://api.github.com/users/melnyk-a/followers","following_url":"https://api.github.com/users/melnyk-a/following{/other_user}","gists_url":"https://api.github.com/users/melnyk-a/gists{/gist_id}","starred_url":"https://api.github.com/users/melnyk-a/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/melnyk-a/subscriptions","organizations_url":"https://api.github.com/users/melnyk-a/orgs","repos_url":"https://api.github.com/users/melnyk-a/repos","events_url":"https://api.github.com/users/melnyk-a/events{/privacy}","received_events_url":"https://api.github.com/users/melnyk-a/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"PavelDubsky","id":12466368,"node_id":"MDQ6VXNlcjEyNDY2MzY4","avatar_url":"https://avatars0.githubusercontent.com/u/12466368?v=4","gravatar_id":"","url":"https://api.github.com/users/PavelDubsky","html_url":"https://github.com/PavelDubsky","followers_url":"https://api.github.com/users/PavelDubsky/followers","following_url":"https://api.github.com/users/PavelDubsky/following{/other_user}","gists_url":"https://api.github.com/users/PavelDubsky/gists{/gist_id}","starred_url":"https://api.github.com/users/PavelDubsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PavelDubsky/subscriptions","organizations_url":"https://api.github.com/users/PavelDubsky/orgs","repos_url":"https://api.github.com/users/PavelDubsky/repos","events_url":"https://api.github.com/users/PavelDubsky/events{/privacy}","received_events_url":"https://api.github.com/users/PavelDubsky/received_events","type":"User","site_admin":false},"assignees":[{"login":"PavelDubsky","id":12466368,"node_id":"MDQ6VXNlcjEyNDY2MzY4","avatar_url":"https://avatars0.githubusercontent.com/u/12466368?v=4","gravatar_id":"","url":"https://api.github.com/users/PavelDubsky","html_url":"https://github.com/PavelDubsky","followers_url":"https://api.github.com/users/PavelDubsky/followers","following_url":"https://api.github.com/users/PavelDubsky/following{/other_user}","gists_url":"https://api.github.com/users/PavelDubsky/gists{/gist_id}","starred_url":"https://api.github.com/users/PavelDubsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PavelDubsky/subscriptions","organizations_url":"https://api.github.com/users/PavelDubsky/orgs","repos_url":"https://api.github.com/users/PavelDubsky/repos","events_url":"https://api.github.com/users/PavelDubsky/events{/privacy}","received_events_url":"https://api.github.com/users/PavelDubsky/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-10-21T18:53:24Z","updated_at":"2018-10-22T12:44:42Z","closed_at":null,"author_association":"OWNER","body":"Почему, когда я вызываю Update Databese, база создается в LocalDb с заполнеными данными.\r\n\r\nНо  если базу удалить и запустить код на выполнение, то она создается на сервере с незаполненными данными. "},"comment":{"url":"https://api.github.com/repos/melnyk-a/Cinema/issues/comments/431824656","html_url":"https://github.com/melnyk-a/Cinema/issues/10#issuecomment-431824656","issue_url":"https://api.github.com/repos/melnyk-a/Cinema/issues/10","id":431824656,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTgyNDY1Ng==","user":{"login":"PavelDubsky","id":12466368,"node_id":"MDQ6VXNlcjEyNDY2MzY4","avatar_url":"https://avatars0.githubusercontent.com/u/12466368?v=4","gravatar_id":"","url":"https://api.github.com/users/PavelDubsky","html_url":"https://github.com/PavelDubsky","followers_url":"https://api.github.com/users/PavelDubsky/followers","following_url":"https://api.github.com/users/PavelDubsky/following{/other_user}","gists_url":"https://api.github.com/users/PavelDubsky/gists{/gist_id}","starred_url":"https://api.github.com/users/PavelDubsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PavelDubsky/subscriptions","organizations_url":"https://api.github.com/users/PavelDubsky/orgs","repos_url":"https://api.github.com/users/PavelDubsky/repos","events_url":"https://api.github.com/users/PavelDubsky/events{/privacy}","received_events_url":"https://api.github.com/users/PavelDubsky/received_events","type":"User","site_admin":false},"created_at":"2018-10-22T12:44:42Z","updated_at":"2018-10-22T12:44:42Z","author_association":"COLLABORATOR","body":"Это связано с `App.config` файлом. Когда запускается прилжение WPF, то используется его конфигурационный файл, в которой есть строка соединений для локального сервера с именем базы данных `Films`.\r\nКогда вызывается команда `Update-Database`, компилируется и \"запускается\" только сборка с `DbContext`, т.е. `Cinema.Data.EntityFramework`. У нее есть свой конфигурационный файл, в котором нет строк соединений, а о конфигурационном файле WPF-приложения в данном контексте неизвестно, поэтому производится откат на настройки по умолчанию (место создания).\r\nВ качестве решения, можно занести такую же строку соединения в конфигурационный файл сборки с Entity Framework.\r\nНу а на счет начальных данных, `Seed` метод вызывается только при `Update-Database`."}}
{"actor":{"display_login":"PavelDubsky"}}