{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/EntityFrameworkCore/issues/13327","repository_url":"https://api.github.com/repos/aspnet/EntityFrameworkCore","labels_url":"https://api.github.com/repos/aspnet/EntityFrameworkCore/issues/13327/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/EntityFrameworkCore/issues/13327/comments","events_url":"https://api.github.com/repos/aspnet/EntityFrameworkCore/issues/13327/events","html_url":"https://github.com/aspnet/EntityFrameworkCore/issues/13327","id":360115124,"node_id":"MDU6SXNzdWUzNjAxMTUxMjQ=","number":13327,"title":"Unhandled Exception: System.NotImplementedException: The method or operation is not implemented.    at Microsoft.EntityFrameworkCore.Cosmos.Sql.Storage.Internal.CosmosSqlDatabaseCreator.EnsureCreated()","user":{"login":"fulviocanducci","id":25593291,"node_id":"MDQ6VXNlcjI1NTkzMjkx","avatar_url":"https://avatars0.githubusercontent.com/u/25593291?v=4","gravatar_id":"","url":"https://api.github.com/users/fulviocanducci","html_url":"https://github.com/fulviocanducci","followers_url":"https://api.github.com/users/fulviocanducci/followers","following_url":"https://api.github.com/users/fulviocanducci/following{/other_user}","gists_url":"https://api.github.com/users/fulviocanducci/gists{/gist_id}","starred_url":"https://api.github.com/users/fulviocanducci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fulviocanducci/subscriptions","organizations_url":"https://api.github.com/users/fulviocanducci/orgs","repos_url":"https://api.github.com/users/fulviocanducci/repos","events_url":"https://api.github.com/users/fulviocanducci/events{/privacy}","received_events_url":"https://api.github.com/users/fulviocanducci/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-14T00:37:02Z","updated_at":"2018-09-14T01:35:29Z","closed_at":"2018-09-14T01:35:29Z","author_association":"NONE","body":"The error posted is at the time of command `db.Database.EnsureCreated();`\r\n\r\n```\r\nException message: Unhandled Exception: System.NotImplementedException: \r\nThe method or operation is not implemented.  at \r\nMicrosoft.EntityFrameworkCore.Cosmos.Sql.Storage\r\n   .Internal.CosmosSqlDatabaseCreator.EnsureCreated()\r\n```\r\n\r\nClass\r\n---\r\n```c#\r\nusing System;\r\nnamespace Models\r\n{\r\n    public class People \r\n    {\r\n        public int PeopleId { get; set; }\r\n        public string Name { get; set; }\r\n        public DateTime Created {get;set;}\r\n    }\r\n}\r\n\r\nusing System;\r\nusing Microsoft.EntityFrameworkCore;\r\nnamespace Models\r\n{\r\n    public class DatabaseContext: DbContext\r\n    {\r\n        public DbSet<People> People {get;set;}\r\n        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)\r\n        {\r\n            optionsBuilder.UseCosmosSql(\r\n                \"https://localhost:8081\",\r\n                \"C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==\",\r\n                \"DatabaseContext\"\r\n            );\r\n        }\r\n    }\r\n}\r\n```\r\n---\r\n\r\nExecution\r\n\r\n```c#\r\nusing System;\r\nusing Models;\r\nnamespace t\r\n{\r\n    class Program\r\n    {\r\n        static void Main(string[] args)\r\n        {\r\n            using (DatabaseContext db = new DatabaseContext())\r\n            {\r\n                db.Database.EnsureCreated(); // Problem\r\n            }\r\n        }\r\n    }\r\n}\r\n```\r\n### Further technical details\r\nDatabase Provider: (e.g. Microsoft.EntityFrameworkCore.Cosmos.Sql)\r\nOperating system: \r\nIDE: (e.g. Visual Studio 2017 15.8.4)\r\n"},"comment":{"url":"https://api.github.com/repos/aspnet/EntityFrameworkCore/issues/comments/421203016","html_url":"https://github.com/aspnet/EntityFrameworkCore/issues/13327#issuecomment-421203016","issue_url":"https://api.github.com/repos/aspnet/EntityFrameworkCore/issues/13327","id":421203016,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMTIwMzAxNg==","user":{"login":"smitpatel","id":1528107,"node_id":"MDQ6VXNlcjE1MjgxMDc=","avatar_url":"https://avatars0.githubusercontent.com/u/1528107?v=4","gravatar_id":"","url":"https://api.github.com/users/smitpatel","html_url":"https://github.com/smitpatel","followers_url":"https://api.github.com/users/smitpatel/followers","following_url":"https://api.github.com/users/smitpatel/following{/other_user}","gists_url":"https://api.github.com/users/smitpatel/gists{/gist_id}","starred_url":"https://api.github.com/users/smitpatel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smitpatel/subscriptions","organizations_url":"https://api.github.com/users/smitpatel/orgs","repos_url":"https://api.github.com/users/smitpatel/repos","events_url":"https://api.github.com/users/smitpatel/events{/privacy}","received_events_url":"https://api.github.com/users/smitpatel/received_events","type":"User","site_admin":false},"created_at":"2018-09-14T01:35:29Z","updated_at":"2018-09-14T01:35:29Z","author_association":"CONTRIBUTOR","body":"Use `EnsureCreatedAsync()` instead. Sync APIs for database creation and SaveChanges are not part of preview2 package. We are adding them for next preview."}}
{"actor":{"display_login":"smitpatel"}}