{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/EntityFramework/issues/2636","labels_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/2636/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/2636/comments","events_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/2636/events","html_url":"https://github.com/aspnet/EntityFramework/issues/2636","id":95459541,"number":2636,"title":"Connection  availability during SQLGENERATION","user":{"login":"PrashanthIBM","id":12443956,"avatar_url":"https://avatars.githubusercontent.com/u/12443956?v=3","gravatar_id":"","url":"https://api.github.com/users/PrashanthIBM","html_url":"https://github.com/PrashanthIBM","followers_url":"https://api.github.com/users/PrashanthIBM/followers","following_url":"https://api.github.com/users/PrashanthIBM/following{/other_user}","gists_url":"https://api.github.com/users/PrashanthIBM/gists{/gist_id}","starred_url":"https://api.github.com/users/PrashanthIBM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PrashanthIBM/subscriptions","organizations_url":"https://api.github.com/users/PrashanthIBM/orgs","repos_url":"https://api.github.com/users/PrashanthIBM/repos","events_url":"https://api.github.com/users/PrashanthIBM/events{/privacy}","received_events_url":"https://api.github.com/users/PrashanthIBM/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-07-16T15:26:43Z","updated_at":"2015-07-17T09:40:28Z","closed_at":null,"body":"Hi ,\r\n@ajcvickers , @bricelam , @rowanmiller @natemcmaster \r\n\r\nI am developing a EF7 provider for a particular database which has many versions of it.\r\nBased on a particular version , i need to take the decision of changing the query generation logic  for basic operations like Insert , Delete , Update and Select .\r\n\r\nDriver development is done based on  7.0.0-beta4  code base.\r\nThe scope for the provider development is to only support \"Code First with Existing Database\" , and also to only  support DML operations( i.e Insert , Update, Delete, Select ) .\r\n\r\nDDL operations like Database creation, table creation wont be supported , hence we do not implement class specific to database creation or support migrations. \r\n\r\nCurrently trying to implement basic connection and query generation functionality, so EF7 designer implementation is also not in the scope of development.\r\n\r\nI went through the Entityframework.Relational code : \r\nUnder this namespace : “ Microsoft.Data.Entity.Relational.Update “ , in this method \"ReaderModificationCommandBatch\".“Execute()” ,  we get the commandText using the call to method GetCommandText() . But in GetCommandText() method, we do not have access to connection object, because of which I am not able to change the path of query generation based on different server versions.\r\n\r\nCan you please help in getting the connection , during query generation ?\r\n\r\nJust a taught : \r\nOne of the way I was thinking of was to define a local  variable ( say RelationalTransaction or    DbConnection object named “conDetails” )  in  ReaderModificationCommandBatch abstract class  and during the call to “Execute” method , initialize this local vairable with the method parameter variable “transaction” or transaction.Connection , so that when I override the GetCommandText, I can get this connection detail using “base.conDetails” and use this variable to know about the version details. I may not be correct and approach might be wrong. \r\n\r\nSo request you valuable suggestion about how to proceed with the issue .\r\n\r\nThanks and Regards,\r\nPrashanth.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/aspnet/EntityFramework/issues/comments/122230017","html_url":"https://github.com/aspnet/EntityFramework/issues/2636#issuecomment-122230017","issue_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/2636","id":122230017,"user":{"login":"PrashanthIBM","id":12443956,"avatar_url":"https://avatars.githubusercontent.com/u/12443956?v=3","gravatar_id":"","url":"https://api.github.com/users/PrashanthIBM","html_url":"https://github.com/PrashanthIBM","followers_url":"https://api.github.com/users/PrashanthIBM/followers","following_url":"https://api.github.com/users/PrashanthIBM/following{/other_user}","gists_url":"https://api.github.com/users/PrashanthIBM/gists{/gist_id}","starred_url":"https://api.github.com/users/PrashanthIBM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PrashanthIBM/subscriptions","organizations_url":"https://api.github.com/users/PrashanthIBM/orgs","repos_url":"https://api.github.com/users/PrashanthIBM/repos","events_url":"https://api.github.com/users/PrashanthIBM/events{/privacy}","received_events_url":"https://api.github.com/users/PrashanthIBM/received_events","type":"User","site_admin":false},"created_at":"2015-07-17T09:40:28Z","updated_at":"2015-07-17T09:40:28Z","body":" Have many versions, so not feasible.\r\n\r\nPlan is to extend the same code base for different database servers . So i need the connection object to know which particular server type the client is connected to and what version of the server it is connected to."}}