{"action":"created","issue":{"url":"https://api.github.com/repos/Glimpse/Glimpse/issues/820","labels_url":"https://api.github.com/repos/Glimpse/Glimpse/issues/820/labels{/name}","comments_url":"https://api.github.com/repos/Glimpse/Glimpse/issues/820/comments","events_url":"https://api.github.com/repos/Glimpse/Glimpse/issues/820/events","html_url":"https://github.com/Glimpse/Glimpse/issues/820","id":37692212,"number":820,"title":"Glimpse.Ado occasionally throws a SqlException","user":{"login":"togakangaroo","id":66150,"avatar_url":"https://avatars.githubusercontent.com/u/66150?v=3","gravatar_id":"","url":"https://api.github.com/users/togakangaroo","html_url":"https://github.com/togakangaroo","followers_url":"https://api.github.com/users/togakangaroo/followers","following_url":"https://api.github.com/users/togakangaroo/following{/other_user}","gists_url":"https://api.github.com/users/togakangaroo/gists{/gist_id}","starred_url":"https://api.github.com/users/togakangaroo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/togakangaroo/subscriptions","organizations_url":"https://api.github.com/users/togakangaroo/orgs","repos_url":"https://api.github.com/users/togakangaroo/repos","events_url":"https://api.github.com/users/togakangaroo/events{/privacy}","received_events_url":"https://api.github.com/users/togakangaroo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"avanderhoorn","id":585619,"avatar_url":"https://avatars.githubusercontent.com/u/585619?v=3","gravatar_id":"","url":"https://api.github.com/users/avanderhoorn","html_url":"https://github.com/avanderhoorn","followers_url":"https://api.github.com/users/avanderhoorn/followers","following_url":"https://api.github.com/users/avanderhoorn/following{/other_user}","gists_url":"https://api.github.com/users/avanderhoorn/gists{/gist_id}","starred_url":"https://api.github.com/users/avanderhoorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avanderhoorn/subscriptions","organizations_url":"https://api.github.com/users/avanderhoorn/orgs","repos_url":"https://api.github.com/users/avanderhoorn/repos","events_url":"https://api.github.com/users/avanderhoorn/events{/privacy}","received_events_url":"https://api.github.com/users/avanderhoorn/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2014-07-11T19:57:47Z","updated_at":"2015-01-16T04:45:47Z","closed_at":null,"body":"Occasionally I get an error from Glimpse with the following stack trace\r\n\r\n```\r\nSystem.Data.SqlClient.SqlException was unhandled by user code\r\n  HResult=-2146232060\r\n  Message=Invalid column name 'CreatedOn'.\r\n  Source=.Net SqlClient Data Provider\r\n  ErrorCode=-2146232060\r\n  Class=16\r\n  LineNumber=2\r\n  Number=207\r\n  Procedure=\"\"\r\n  Server=(LocalDB)\\v11.0\r\n  State=1\r\n  StackTrace:\r\n       at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)\r\n       at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)\r\n       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)\r\n       at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)\r\n       at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()\r\n       at System.Data.SqlClient.SqlDataReader.get_MetaData()\r\n       at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)\r\n       at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)\r\n       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)\r\n       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)\r\n       at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)\r\n       at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)\r\n       at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)\r\n       at Glimpse.Ado.AlternateType.GlimpseDbCommand.ExecuteDbDataReader(CommandBehavior behavior)\r\n       at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)\r\n       at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.<>c__DisplayClassb.<Reader>b__8()\r\n       at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TInterceptionContext,TResult](Func`1 operation, TInterceptionContext interceptionContext, Action`1 executing, Action`1 executed)\r\n  InnerException: \r\n```\r\n\r\nIt doesn't happen all the time but somewhat reliably when running with the VS debugger attached.\r\n\r\nThe only thing that I can think is that my entities have a CreatedOn DateTime column that is filled via `VisoftInc.EFHooks 2.0.0.0`\r\n\r\n```\r\n    public class MyAppDbContext : HookedDbContext\r\n    {\r\n        ...\r\n        void registerHooks() {\r\n            this.RegisterHook(new FillCreatedTimestamp());\r\n            this.RegisterHook(new FillUpdatedTimestamp());\r\n        }\r\n\r\n        public MyAppDbContext() : base() { registerHooks(); }\r\n\r\n        public MyAppDbContext(string connectionString) : base(connectionString) { registerHooks(); }\r\n    }\r\n\r\n    public class FillCreatedTimestamp : PreInsertHook<UserModifiable.Properties>\r\n    {\r\n        public override void Hook(UserModifiable.Properties entity, HookEntityMetadata metadata) {\r\n            entity.LastModifiedBy = entity.CreatedBy ?? HttpContext.Current.IfNotNull(x => x.User).IfNotNull(x => x.Identity.Name);\r\n            entity.LastModifiedOn = DateTime.UtcNow;\r\n            entity.CreatedOn = entity.LastModifiedOn;\r\n            entity.CreatedBy = entity.LastModifiedBy;\r\n        }\r\n    }\r\n    public class FillUpdatedTimestamp : PreUpdateHook<UserModifiable.Properties>\r\n    {\r\n        public override void Hook(UserModifiable.Properties entity, HookEntityMetadata metadata) {\r\n            entity.LastModifiedBy = HttpContext.Current.IfNotNull(x => x.User).IfNotNull(x => x.Identity.Name);\r\n            entity.LastModifiedOn = DateTime.UtcNow;\r\n        }\r\n    }\r\n```\r\n\r\nThis filters for only entities that match a certain type so I'm pretty confused about how that could be an issue."},"comment":{"url":"https://api.github.com/repos/Glimpse/Glimpse/issues/comments/70207863","html_url":"https://github.com/Glimpse/Glimpse/issues/820#issuecomment-70207863","issue_url":"https://api.github.com/repos/Glimpse/Glimpse/issues/820","id":70207863,"user":{"login":"avanderhoorn","id":585619,"avatar_url":"https://avatars.githubusercontent.com/u/585619?v=3","gravatar_id":"","url":"https://api.github.com/users/avanderhoorn","html_url":"https://github.com/avanderhoorn","followers_url":"https://api.github.com/users/avanderhoorn/followers","following_url":"https://api.github.com/users/avanderhoorn/following{/other_user}","gists_url":"https://api.github.com/users/avanderhoorn/gists{/gist_id}","starred_url":"https://api.github.com/users/avanderhoorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avanderhoorn/subscriptions","organizations_url":"https://api.github.com/users/avanderhoorn/orgs","repos_url":"https://api.github.com/users/avanderhoorn/repos","events_url":"https://api.github.com/users/avanderhoorn/events{/privacy}","received_events_url":"https://api.github.com/users/avanderhoorn/received_events","type":"User","site_admin":false},"created_at":"2015-01-16T04:45:47Z","updated_at":"2015-01-16T04:45:47Z","body":"@togakangaroo Is this something that is still and issue?"}}