{"action":"created","issue":{"url":"https://api.github.com/repos/zzzprojects/EntityFramework-Plus/issues/20","repository_url":"https://api.github.com/repos/zzzprojects/EntityFramework-Plus","labels_url":"https://api.github.com/repos/zzzprojects/EntityFramework-Plus/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/zzzprojects/EntityFramework-Plus/issues/20/comments","events_url":"https://api.github.com/repos/zzzprojects/EntityFramework-Plus/issues/20/events","html_url":"https://github.com/zzzprojects/EntityFramework-Plus/issues/20","id":169838498,"number":20,"title":"Batch update/delete question","user":{"login":"icebits","id":1852598,"avatar_url":"https://avatars.githubusercontent.com/u/1852598?v=3","gravatar_id":"","url":"https://api.github.com/users/icebits","html_url":"https://github.com/icebits","followers_url":"https://api.github.com/users/icebits/followers","following_url":"https://api.github.com/users/icebits/following{/other_user}","gists_url":"https://api.github.com/users/icebits/gists{/gist_id}","starred_url":"https://api.github.com/users/icebits/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icebits/subscriptions","organizations_url":"https://api.github.com/users/icebits/orgs","repos_url":"https://api.github.com/users/icebits/repos","events_url":"https://api.github.com/users/icebits/events{/privacy}","received_events_url":"https://api.github.com/users/icebits/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-08T03:49:23Z","updated_at":"2016-08-08T03:56:56Z","closed_at":null,"body":"Hi,\r\n\r\nI have encountered issues with batch update and delete. It is working fine in v1.2.5, but it throw exception after v1.3.4, including 1.3.5. My project using VS2015, EF 6.1.3 and .net 4.6.1, db first. Can assist to look what is wrong, is it additional code needed after new release? Thanks.\r\n\r\nSample code that trigger issue:\r\n\r\nvar downloadSource = (from x in ctx.trnDownloadSources\r\n                                                   where x.WindowsLogon.ToUpper() == clientWindowsLogon.WindowsLogonName.ToUpper()\r\n                                                   select x);\r\n\r\n                            if (downloadSource.Any())\r\n                            {\r\n                                downloadSource.Update(x => new trnDownloadSource\r\n                                {\r\n                                    IsComplete = 3\r\n                                });\r\n                            }\r\n\r\nOops! A general error has occurred. Please report the issue including the stack trace to our support team: info@zzzprojects.com\r\n\r\nat Z.EntityFramework.Plus.Internal.Model.GetConceptualModelString(DbContext this)\\r\\n   at Z.EntityFramework.Plus.Internal.Model.GetDatabaseFirst(DbContext context)\\r\\n   at Z.EntityFramework.Plus.InternalExtensions.GetModel(DbContext context)\\r\\n   at Z.EntityFramework.Plus.BatchUpdate.Execute[T](IQueryable`1 query, Expression`1 updateFactory)\\r\\n   at Z.EntityFramework.Plus.BatchUpdateExtensions.Update[T](IQueryable`1 query, Expression`1 updateFactory, Action`1 batchUpdateBuilder)\\r\\n   at Z.EntityFramework.Plus.BatchUpdateExtensions.Update[T](IQueryable`1 query, Expression`1 updateFactory)\\r\\n..."},"comment":{"url":"https://api.github.com/repos/zzzprojects/EntityFramework-Plus/issues/comments/238136936","html_url":"https://github.com/zzzprojects/EntityFramework-Plus/issues/20#issuecomment-238136936","issue_url":"https://api.github.com/repos/zzzprojects/EntityFramework-Plus/issues/20","id":238136936,"user":{"login":"zzzprojects","id":11062426,"avatar_url":"https://avatars.githubusercontent.com/u/11062426?v=3","gravatar_id":"","url":"https://api.github.com/users/zzzprojects","html_url":"https://github.com/zzzprojects","followers_url":"https://api.github.com/users/zzzprojects/followers","following_url":"https://api.github.com/users/zzzprojects/following{/other_user}","gists_url":"https://api.github.com/users/zzzprojects/gists{/gist_id}","starred_url":"https://api.github.com/users/zzzprojects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zzzprojects/subscriptions","organizations_url":"https://api.github.com/users/zzzprojects/orgs","repos_url":"https://api.github.com/users/zzzprojects/repos","events_url":"https://api.github.com/users/zzzprojects/events{/privacy}","received_events_url":"https://api.github.com/users/zzzprojects/received_events","type":"User","site_admin":false},"created_at":"2016-08-08T03:56:56Z","updated_at":"2016-08-08T03:56:56Z","body":"Thank you icebits for reporting this issue.\r\n\r\nIt looks to be caused when we try to read the model.\r\n\r\nTomorrow, we will try our code with some model we own to see if we find something missing.\r\n\r\nIf you can, you can send us directly your model to let us test with it. This will greatly help us to find the issue.\r\n\r\n**Database First**\r\nSimply send us your .edmx file.\r\n \r\n**Code First**\r\nYou can generate your XML model by using the following method. \r\n\r\n```csharp\r\npublic string GetModelXDocument(DbContext context)\r\n{\r\n    XDocument doc;\r\n    using (var memoryStream = new MemoryStream())\r\n    {\r\n        using (XmlWriter xmlWriter = XmlWriter.Create(memoryStream, new XmlWriterSettings { Indent = true }))\r\n        {\r\n            EdmxWriter.WriteEdmx(context, xmlWriter);\r\n        }\r\n \r\n        memoryStream.Position = 0;\r\n \r\n        doc = XDocument.Load(memoryStream);\r\n    }\r\n    return doc.ToString();\r\n}\r\n```\r\n\r\n"}}
{"actor":{"display_login":"zzzprojects"}}