{"action":"created","issue":{"url":"https://api.github.com/repos/mrahhal/Migrator.EF6/issues/28","repository_url":"https://api.github.com/repos/mrahhal/Migrator.EF6","labels_url":"https://api.github.com/repos/mrahhal/Migrator.EF6/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/mrahhal/Migrator.EF6/issues/28/comments","events_url":"https://api.github.com/repos/mrahhal/Migrator.EF6/issues/28/events","html_url":"https://github.com/mrahhal/Migrator.EF6/issues/28","id":181478304,"number":28,"title":"Any chance to extend functionality to be able to supply a connection string and provider and/or startup project?","user":{"login":"DOTang","id":3045507,"avatar_url":"https://avatars.githubusercontent.com/u/3045507?v=3","gravatar_id":"","url":"https://api.github.com/users/DOTang","html_url":"https://github.com/DOTang","followers_url":"https://api.github.com/users/DOTang/followers","following_url":"https://api.github.com/users/DOTang/following{/other_user}","gists_url":"https://api.github.com/users/DOTang/gists{/gist_id}","starred_url":"https://api.github.com/users/DOTang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DOTang/subscriptions","organizations_url":"https://api.github.com/users/DOTang/orgs","repos_url":"https://api.github.com/users/DOTang/repos","events_url":"https://api.github.com/users/DOTang/events{/privacy}","received_events_url":"https://api.github.com/users/DOTang/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-10-06T17:33:34Z","updated_at":"2016-10-07T10:24:15Z","closed_at":"2016-10-07T10:24:15Z","body":"These commands in the EF6 tooling were extremely helpful for my project setup. Basically I have a class library which contains the entity defintions, context, and API for a set of entities. My use case is allowing other programmers to use my API. I've abstracted as much of EF as I can since my API wraps it and they don't care about that. However, this means I am supplying my context connection string at run time like this:\r\n\r\n`public MyApiDbContext() : base(ApiInitializer.GetConnectionStringName())`\r\n\r\nand my initializer has them call a command `ApiInitializer.Initialize(connectionStringName) in app startup. This allows my API library to be DB agnostic and anyone wanting to utilize my entities can do so. But this setup doesn't work with your tools. It would work in EF6 tools normally by allowing to specify the startup project as the actual web app and then supplying the connection string name. Or also work by just supplying the full connection string and provider string manually in the migrate command. Any chance you could implement either of those?\r\n\r\nAwesome library and thank you, can't believe MS has had no tooling in class libraries for over 9 months still and no ability to run tooling on EF6 in .NET CORE. Too long for very common scenarios."},"comment":{"url":"https://api.github.com/repos/mrahhal/Migrator.EF6/issues/comments/252209111","html_url":"https://github.com/mrahhal/Migrator.EF6/issues/28#issuecomment-252209111","issue_url":"https://api.github.com/repos/mrahhal/Migrator.EF6/issues/28","id":252209111,"user":{"login":"mrahhal","id":4404199,"avatar_url":"https://avatars.githubusercontent.com/u/4404199?v=3","gravatar_id":"","url":"https://api.github.com/users/mrahhal","html_url":"https://github.com/mrahhal","followers_url":"https://api.github.com/users/mrahhal/followers","following_url":"https://api.github.com/users/mrahhal/following{/other_user}","gists_url":"https://api.github.com/users/mrahhal/gists{/gist_id}","starred_url":"https://api.github.com/users/mrahhal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrahhal/subscriptions","organizations_url":"https://api.github.com/users/mrahhal/orgs","repos_url":"https://api.github.com/users/mrahhal/repos","events_url":"https://api.github.com/users/mrahhal/events{/privacy}","received_events_url":"https://api.github.com/users/mrahhal/received_events","type":"User","site_admin":false},"created_at":"2016-10-07T10:24:15Z","updated_at":"2016-10-07T10:24:15Z","body":"Resolved in 0b09ab54b07050cdc423dc1df1e8560aa698bb02, included in `1.0.6`.\r\n\r\n```\r\ndotnet ef database update --connection-string \"connection string\" -provider \"provider name\"\r\n```\r\n\r\nNo need to change your `DbContext` at all, the connection string provided will override any kind of value you've given to your `DbContext`.\r\n\r\nNote: you can omit the provider's name as the default will be used. For more you can add an `-h` and help will be showed.\r\n\r\nLet me know if you have any trouble getting your particular scenario to work."}}
{"actor":{"display_login":"mrahhal"}}