{"action":"created","issue":{"url":"https://api.github.com/repos/thinktecture/Thinktecture.IdentityServer.v3.EntityFramework/issues/33","labels_url":"https://api.github.com/repos/thinktecture/Thinktecture.IdentityServer.v3.EntityFramework/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/thinktecture/Thinktecture.IdentityServer.v3.EntityFramework/issues/33/comments","events_url":"https://api.github.com/repos/thinktecture/Thinktecture.IdentityServer.v3.EntityFramework/issues/33/events","html_url":"https://github.com/thinktecture/Thinktecture.IdentityServer.v3.EntityFramework/issues/33","id":53749012,"number":33,"title":"Support for other RDBMS than SQL Server","user":{"login":"LeandroPT","id":8915288,"avatar_url":"https://avatars.githubusercontent.com/u/8915288?v=3","gravatar_id":"","url":"https://api.github.com/users/LeandroPT","html_url":"https://github.com/LeandroPT","followers_url":"https://api.github.com/users/LeandroPT/followers","following_url":"https://api.github.com/users/LeandroPT/following{/other_user}","gists_url":"https://api.github.com/users/LeandroPT/gists{/gist_id}","starred_url":"https://api.github.com/users/LeandroPT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LeandroPT/subscriptions","organizations_url":"https://api.github.com/users/LeandroPT/orgs","repos_url":"https://api.github.com/users/LeandroPT/repos","events_url":"https://api.github.com/users/LeandroPT/events{/privacy}","received_events_url":"https://api.github.com/users/LeandroPT/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/thinktecture/Thinktecture.IdentityServer.v3.EntityFramework/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":{"login":"brockallen","id":649492,"avatar_url":"https://avatars.githubusercontent.com/u/649492?v=3","gravatar_id":"","url":"https://api.github.com/users/brockallen","html_url":"https://github.com/brockallen","followers_url":"https://api.github.com/users/brockallen/followers","following_url":"https://api.github.com/users/brockallen/following{/other_user}","gists_url":"https://api.github.com/users/brockallen/gists{/gist_id}","starred_url":"https://api.github.com/users/brockallen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brockallen/subscriptions","organizations_url":"https://api.github.com/users/brockallen/orgs","repos_url":"https://api.github.com/users/brockallen/repos","events_url":"https://api.github.com/users/brockallen/events{/privacy}","received_events_url":"https://api.github.com/users/brockallen/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2015-01-08T13:14:22Z","updated_at":"2015-01-19T20:53:03Z","closed_at":null,"body":"Hello All,\r\n\r\nSorry about \"reopening\" a closed issue #2....\r\n\r\nAs Brock has probably noticed ( by my constant nagging :) ), it is difficult to use current EF code first against other RDBMS than SQL Server, in my case Oracle.\r\n\r\nI have been able to IDSRV + EF successfully against an Oracle RDBMS by the use of a interceptor.\r\nThe disadvantage of this approach, is that it requires to parse and modify every generated query before execution, and to disableDatabaseInitialization.\r\nThe advantage however is the possibility to do about anything, including type change, name, change, whatever, without changing code, by the use of app.config\r\n**`\r\n    <interceptors>\r\n      <interceptor type=\"IDS.Core.ef6.ChangeSchemaNameCommandInterceptor, IDS.Core\" />\r\n    </interceptors>\r\n    <contexts>\r\n      <context type=\"Thinktecture.IdentityServer.Core.EntityFramework.OperationalDbContext, Thinktecture.IdentityServer.Core.EntityFramework\" disableDatabaseInitialization=\"true\" />\r\n      <context type=\"Thinktecture.IdentityServer.Core.EntityFramework.ClientConfigurationDbContext, Thinktecture.IdentityServer.Core.EntityFramework\" disableDatabaseInitialization=\"true\" />\r\n      <context type=\"Thinktecture.IdentityServer.Core.EntityFramework.ScopeConfigurationDbContext, Thinktecture.IdentityServer.Core.EntityFramework\" disableDatabaseInitialization=\"true\" />`**\r\n\r\n\r\nI have been looking for a better way to change the schema name from the dreaded \"dbo.\" to the oracle user, uppercase table and column names (Oracle accepts camel case, but \"hand made\" queries implies the use of \"\" in every column, and table names, which is not the \"normal\" for oracle developers.\r\n\r\nThe better way, is by tweaking the OnModelCreating by injecting two conventions on the \"OnModelCreating\" on BaseDbContext. (pretty much this: http://msdn.microsoft.com/en-us/data/jj819164.aspx)\r\n\r\nSo, for it to work, and to allow it to adjust to other RDBMS, i would like to know if you would be willing to place some kind of plug-in or (dependency injection)  on BaseDbContext;\r\n        protected override void OnModelCreating(DbModelBuilder modelBuilder)\r\n        {\r\n            **`modelBuilder.Conventions.Add<UppercaseForeignKeyNameConvention>();\r\n            modelBuilder.Conventions.Add<UppercaseTableSchemaConvention>();`**\r\n            base.OnModelCreating(modelBuilder);\r\n        }\r\n\r\nThe part in bold, would be whatever the user wants inside a class outside the EF assembly from a predefined interface.\r\n\r\nPublic Interface IBaseDbContextOnModelCreating\r\n{\r\n   public void OnModelCreating(DbModelBuilder modelBuilder);\r\n}\r\n\r\nWhat is your thought on this?\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/thinktecture/Thinktecture.IdentityServer.v3.EntityFramework/issues/comments/70558602","html_url":"https://github.com/thinktecture/Thinktecture.IdentityServer.v3.EntityFramework/issues/33#issuecomment-70558602","issue_url":"https://api.github.com/repos/thinktecture/Thinktecture.IdentityServer.v3.EntityFramework/issues/33","id":70558602,"user":{"login":"brockallen","id":649492,"avatar_url":"https://avatars.githubusercontent.com/u/649492?v=3","gravatar_id":"","url":"https://api.github.com/users/brockallen","html_url":"https://github.com/brockallen","followers_url":"https://api.github.com/users/brockallen/followers","following_url":"https://api.github.com/users/brockallen/following{/other_user}","gists_url":"https://api.github.com/users/brockallen/gists{/gist_id}","starred_url":"https://api.github.com/users/brockallen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brockallen/subscriptions","organizations_url":"https://api.github.com/users/brockallen/orgs","repos_url":"https://api.github.com/users/brockallen/repos","events_url":"https://api.github.com/users/brockallen/events{/privacy}","received_events_url":"https://api.github.com/users/brockallen/received_events","type":"User","site_admin":false},"created_at":"2015-01-19T20:53:03Z","updated_at":"2015-01-19T20:53:03Z","body":"Ok, the DbContexts are now injected. Give this a try and see if it works for you."}}