{"action":"created","issue":{"url":"https://api.github.com/repos/Breeze/breeze.tooling/issues/7","repository_url":"https://api.github.com/repos/Breeze/breeze.tooling","labels_url":"https://api.github.com/repos/Breeze/breeze.tooling/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/Breeze/breeze.tooling/issues/7/comments","events_url":"https://api.github.com/repos/Breeze/breeze.tooling/issues/7/events","html_url":"https://github.com/Breeze/breeze.tooling/issues/7","id":223134722,"number":7,"title":"// This is might be because we have a DbFirst DbContext, so let's try it out.","user":{"login":"mikemichaelis","id":1304122,"avatar_url":"https://avatars2.githubusercontent.com/u/1304122?v=3","gravatar_id":"","url":"https://api.github.com/users/mikemichaelis","html_url":"https://github.com/mikemichaelis","followers_url":"https://api.github.com/users/mikemichaelis/followers","following_url":"https://api.github.com/users/mikemichaelis/following{/other_user}","gists_url":"https://api.github.com/users/mikemichaelis/gists{/gist_id}","starred_url":"https://api.github.com/users/mikemichaelis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikemichaelis/subscriptions","organizations_url":"https://api.github.com/users/mikemichaelis/orgs","repos_url":"https://api.github.com/users/mikemichaelis/repos","events_url":"https://api.github.com/users/mikemichaelis/events{/privacy}","received_events_url":"https://api.github.com/users/mikemichaelis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-04-20T17:02:07Z","updated_at":"2017-04-21T16:18:17Z","closed_at":null,"body":"From MetadataGenerator/Program.cs:\r\n\r\n/// When using a DbFirst approach EF thwros two kind of exceptions:\r\n**/// 1. InvalidOperationException is there is no connection string for the DbContext we are working on.**\r\n/// 2. UnintentionalCodeFirstException if it finds the connection string for the DbContext. \r\n///     UnintentionalCodeFirstException inherits from InvalidOperationException\r\n\r\nThe only way I can get a DbFirst EF 6.0 model to produce Metadata is to uncomment:\r\n\r\n            catch (InvalidOperationException iex) // This is might be because we have a DbFirst DbContext, so let's try it out.\r\n            {\r\n                try\r\n                {\r\n                    return EFContextProvider<object>.GetMetadataFromDbFirstAssembly(type.Assembly, Options.ResourcePrefix);\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    Console.WriteLine(\"An exception was thrown while processing the dbfirst assembly {0}. {1}\", type.Assembly.FullName, ex);\r\n                }\r\n            }\r\n\r\nThe InvalidOperationException thrown does have the message:\r\n\r\n\"No connection string named 'TIPS_Corn_DevEntities' could be found in the application config file.\"\r\n\r\nas is indicated in the /// 1 comment above, however the connection string does exist and is properly named within the specified .dll.config.  Properly catching and executing \r\n\r\nGetMetadataFromDbFirstAssembly()\r\n\r\nwill properly generate the metadata.\r\n\r\nWhy is this code commented out?\r\n\r\nThanks,\r\nMike"},"comment":{"url":"https://api.github.com/repos/Breeze/breeze.tooling/issues/comments/296235917","html_url":"https://github.com/Breeze/breeze.tooling/issues/7#issuecomment-296235917","issue_url":"https://api.github.com/repos/Breeze/breeze.tooling/issues/7","id":296235917,"user":{"login":"mikemichaelis","id":1304122,"avatar_url":"https://avatars2.githubusercontent.com/u/1304122?v=3","gravatar_id":"","url":"https://api.github.com/users/mikemichaelis","html_url":"https://github.com/mikemichaelis","followers_url":"https://api.github.com/users/mikemichaelis/followers","following_url":"https://api.github.com/users/mikemichaelis/following{/other_user}","gists_url":"https://api.github.com/users/mikemichaelis/gists{/gist_id}","starred_url":"https://api.github.com/users/mikemichaelis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikemichaelis/subscriptions","organizations_url":"https://api.github.com/users/mikemichaelis/orgs","repos_url":"https://api.github.com/users/mikemichaelis/repos","events_url":"https://api.github.com/users/mikemichaelis/events{/privacy}","received_events_url":"https://api.github.com/users/mikemichaelis/received_events","type":"User","site_admin":false},"created_at":"2017-04-21T16:18:17Z","updated_at":"2017-04-21T16:18:17Z","body":"One more thing, your existing docs for MetadataGenerator are wrong.  The docs show the parameters with the full parameter name but only a single leading dash.  Ie\r\n\r\n-native\r\n\r\nshould be\r\n\r\n--native OR -n\r\n\r\nRegardless neither of those actually work, even in temphire.angular - edit package.json/metadata:\r\n\r\n\"metadata\": \".\\\\tools\\\\bin\\\\MetadataGenerator.exe -i ..\\\\..\\\\BreezeTest\\\\test-model\\\\notModel\\\\bin\\\\Debug\\\\notModel.dll -o metadata.json -n\"\r\n\r\nProduces nothing as does --native.  There is a race condition between when you launch the Node Process to convert the json and you delete the source json itself.  IE\r\n\r\nConvertCsdlToNative(tempFileName, fileNameFullPath);\r\nFile.Delete(tempFileName);\r\n\r\nOpps................seriously wish I hadn't touted BreezeJS to my team. I'm probably going to end up looking like an idiot.......\r\n\r\n<< mike"}}
{"actor":{"display_login":"mikemichaelis"}}