{"action":"created","issue":{"url":"https://api.github.com/repos/linq2db/linq2db/issues/1412","repository_url":"https://api.github.com/repos/linq2db/linq2db","labels_url":"https://api.github.com/repos/linq2db/linq2db/issues/1412/labels{/name}","comments_url":"https://api.github.com/repos/linq2db/linq2db/issues/1412/comments","events_url":"https://api.github.com/repos/linq2db/linq2db/issues/1412/events","html_url":"https://github.com/linq2db/linq2db/issues/1412","id":382154451,"node_id":"MDU6SXNzdWUzODIxNTQ0NTE=","number":1412,"title":"Query wich creates wrong mapping in 2.5 (worked in 2.3)","user":{"login":"jogibear9988","id":364896,"node_id":"MDQ6VXNlcjM2NDg5Ng==","avatar_url":"https://avatars3.githubusercontent.com/u/364896?v=4","gravatar_id":"","url":"https://api.github.com/users/jogibear9988","html_url":"https://github.com/jogibear9988","followers_url":"https://api.github.com/users/jogibear9988/followers","following_url":"https://api.github.com/users/jogibear9988/following{/other_user}","gists_url":"https://api.github.com/users/jogibear9988/gists{/gist_id}","starred_url":"https://api.github.com/users/jogibear9988/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jogibear9988/subscriptions","organizations_url":"https://api.github.com/users/jogibear9988/orgs","repos_url":"https://api.github.com/users/jogibear9988/repos","events_url":"https://api.github.com/users/jogibear9988/events{/privacy}","received_events_url":"https://api.github.com/users/jogibear9988/received_events","type":"User","site_admin":false},"labels":[{"id":533878923,"node_id":"MDU6TGFiZWw1MzM4Nzg5MjM=","url":"https://api.github.com/repos/linq2db/linq2db/labels/bug","name":"bug","color":"b60205","default":true},{"id":850191368,"node_id":"MDU6TGFiZWw4NTAxOTEzNjg=","url":"https://api.github.com/repos/linq2db/linq2db/labels/critical","name":"critical","color":"fbca04","default":false},{"id":872316954,"node_id":"MDU6TGFiZWw4NzIzMTY5NTQ=","url":"https://api.github.com/repos/linq2db/linq2db/labels/patch-proposed","name":"patch-proposed","color":"99ed84","default":false},{"id":975992631,"node_id":"MDU6TGFiZWw5NzU5OTI2MzE=","url":"https://api.github.com/repos/linq2db/linq2db/labels/regression","name":"regression","color":"e85ca4","default":false}],"state":"closed","locked":false,"assignee":{"login":"sdanyliv","id":783759,"node_id":"MDQ6VXNlcjc4Mzc1OQ==","avatar_url":"https://avatars1.githubusercontent.com/u/783759?v=4","gravatar_id":"","url":"https://api.github.com/users/sdanyliv","html_url":"https://github.com/sdanyliv","followers_url":"https://api.github.com/users/sdanyliv/followers","following_url":"https://api.github.com/users/sdanyliv/following{/other_user}","gists_url":"https://api.github.com/users/sdanyliv/gists{/gist_id}","starred_url":"https://api.github.com/users/sdanyliv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdanyliv/subscriptions","organizations_url":"https://api.github.com/users/sdanyliv/orgs","repos_url":"https://api.github.com/users/sdanyliv/repos","events_url":"https://api.github.com/users/sdanyliv/events{/privacy}","received_events_url":"https://api.github.com/users/sdanyliv/received_events","type":"User","site_admin":false},"assignees":[{"login":"sdanyliv","id":783759,"node_id":"MDQ6VXNlcjc4Mzc1OQ==","avatar_url":"https://avatars1.githubusercontent.com/u/783759?v=4","gravatar_id":"","url":"https://api.github.com/users/sdanyliv","html_url":"https://github.com/sdanyliv","followers_url":"https://api.github.com/users/sdanyliv/followers","following_url":"https://api.github.com/users/sdanyliv/following{/other_user}","gists_url":"https://api.github.com/users/sdanyliv/gists{/gist_id}","starred_url":"https://api.github.com/users/sdanyliv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdanyliv/subscriptions","organizations_url":"https://api.github.com/users/sdanyliv/orgs","repos_url":"https://api.github.com/users/sdanyliv/repos","events_url":"https://api.github.com/users/sdanyliv/events{/privacy}","received_events_url":"https://api.github.com/users/sdanyliv/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/linq2db/linq2db/milestones/19","html_url":"https://github.com/linq2db/linq2db/milestone/19","labels_url":"https://api.github.com/repos/linq2db/linq2db/milestones/19/labels","id":3834020,"node_id":"MDk6TWlsZXN0b25lMzgzNDAyMA==","number":19,"title":"2.5.3","description":"","creator":{"login":"MaceWindu","id":1099238,"node_id":"MDQ6VXNlcjEwOTkyMzg=","avatar_url":"https://avatars1.githubusercontent.com/u/1099238?v=4","gravatar_id":"","url":"https://api.github.com/users/MaceWindu","html_url":"https://github.com/MaceWindu","followers_url":"https://api.github.com/users/MaceWindu/followers","following_url":"https://api.github.com/users/MaceWindu/following{/other_user}","gists_url":"https://api.github.com/users/MaceWindu/gists{/gist_id}","starred_url":"https://api.github.com/users/MaceWindu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaceWindu/subscriptions","organizations_url":"https://api.github.com/users/MaceWindu/orgs","repos_url":"https://api.github.com/users/MaceWindu/repos","events_url":"https://api.github.com/users/MaceWindu/events{/privacy}","received_events_url":"https://api.github.com/users/MaceWindu/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":3,"state":"closed","created_at":"2018-11-20T09:56:25Z","updated_at":"2018-11-20T10:56:42Z","due_on":"2018-11-20T08:00:00Z","closed_at":"2018-11-20T10:56:42Z"},"comments":10,"created_at":"2018-11-19T10:42:09Z","updated_at":"2018-11-20T11:07:25Z","closed_at":"2018-11-20T10:56:28Z","author_association":"CONTRIBUTOR","body":"I've the following query:\r\n\r\n            var qry = from res in s.Query<WmsLoadCarrierDTO>(showArchivedItems)\r\n                      join type in s.GetTable<WmsResourceTypeDTO>() on res.TypeID equals type.Id into tpList\r\n                      from tp in tpList.DefaultIfEmpty()\r\n                      join r in s.GetTable<WmsResourcePointDTO>() on res.ResourcePointID equals r.Id into pointList\r\n                      from rp in pointList.DefaultIfEmpty()\r\n                      join rss in s.GetTable<RefResourceStorageShelfDTO>() on res.Id equals rss.ResourceID into rssn\r\n                      from rss in rssn.DefaultIfEmpty()\r\n                      join ss in s.GetTable<StorageShelfDTO>() on rss.StorageShelfID equals ss.Id into ssn\r\n                      from ss in ssn.DefaultIfEmpty()\r\n                      join resv in s.GetTable<RefOutfeedTransportOrderResourceDTO>() on res.Id equals resv.ResourceID into reslist\r\n                      select new WmsResourceCombinedDTO() { LoadCarrier = res, ResourceType = tp, ResourcePoint = rp, StorageShelf = ss, Reservations = reslist.Count() };\r\n\r\n            return qry;\r\n\r\nwich creates the following Mapping Expression \r\n\r\n\t.Lambda #Lambda1<System.Func`3[LinqToDB.Linq.IQueryRunner,System.Data.IDataReader,MCC.WMS.ServiceInterfaces.DTO.WmsResourceCombinedDTO]>(\r\n\t\tLinqToDB.Linq.IQueryRunner $qr,\r\n\t\tSystem.Data.IDataReader $dr) {\r\n\t\t.Invoke (.Lambda #Lambda2<System.Func`6[LinqToDB.Linq.IQueryRunner,LinqToDB.IDataContext,System.Data.IDataReader,System.Linq.Expressions.Expression,System.Object[],MCC.WMS.ServiceInterfaces.DTO.WmsResourceCombinedDTO]>)(\r\n\t\t\t$qr,\r\n\t\t\t$qr.DataContext,\r\n\t\t\t$dr,\r\n\t\t\t$qr.Expression,\r\n\t\t\t$qr.Parameters)\r\n\t}\r\n\r\n\t.Lambda #Lambda2<System.Func`6[LinqToDB.Linq.IQueryRunner,LinqToDB.IDataContext,System.Data.IDataReader,System.Linq.Expressions.Expression,System.Object[],MCC.WMS.ServiceInterfaces.DTO.WmsResourceCombinedDTO]>(\r\n\t\tLinqToDB.Linq.IQueryRunner $qr,\r\n\t\tLinqToDB.IDataContext $dctx,\r\n\t\tSystem.Data.IDataReader $rd,\r\n\t\tSystem.Linq.Expressions.Expression $expr,\r\n\t\tSystem.Object[] $ps) {\r\n\t\t.Block(\r\n\t\t\tSystem.Data.SqlClient.SqlDataReader $ldr,\r\n\t\t\tMCC.WMS.ServiceInterfaces.DTO.WmsLoadCarrierDTO $WmsLoadCarrierDTO1,\r\n\t\t\tMCC.WMS.ServiceInterfaces.DTO.WmsResourceTypeDTO $WmsResourceTypeDTO2,\r\n\t\t\tMCC.WMS.ServiceInterfaces.DTO.WmsResourcePointDTO $WmsResourcePointDTO3,\r\n\t\t\tMCC.WMS.ServiceInterfaces.DTO.StorageShelfDTO $StorageShelfDTO4,\r\n\t\t\tMCC.WMS.ServiceInterfaces.DTO.WmsResourceCombinedDTO $WmsResourceCombinedDTO5) {\r\n\t\t\t$ldr = (System.Data.SqlClient.SqlDataReader)$rd;\r\n\t\t\t$WmsLoadCarrierDTO1 = (MCC.WMS.ServiceInterfaces.DTO.WmsLoadCarrierDTO).Call LinqToDB.Linq.Builder.TableBuilder+TableContext.OnEntityCreated(\r\n\t\t\t\t$dctx,\r\n\t\t\t\t.New MCC.WMS.ServiceInterfaces.DTO.WmsLoadCarrierDTO(){\r\n\t\t\t\t\tId = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(0)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\t.Constant<System.Guid>(00000000-0000-0000-0000-000000000000)\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t.Call $ldr.GetGuid(0)\r\n\t\t\t\t\t},\r\n\t\t\t\t\tExtensionData = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(1)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t.Call $ldr.GetString(1)\r\n\t\t\t\t\t},\r\n\t\t\t\t\tModifiedTimeStamp = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(2)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\t.Constant<System.DateTime>(01.01.0001 00:00:00)\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t.New System.DateTime((System.Int64).Call $ldr.GetInt32(2))\r\n\t\t\t\t\t},\r\n\t\t\t\t\tCreatedTimeStamp = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(3)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\t.Constant<System.DateTime>(01.01.0001 00:00:00)\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t.New System.DateTime((System.Int64).Call $ldr.GetInt32(3))\r\n\t\t\t\t\t},\r\n\t\t\t\t\tCustomLong9 = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(4)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t.New System.Nullable`1[System.Int64]((System.Int64).Call $ldr.GetInt32(4))\r\n\t\t\t\t\t},\r\n\t\t\t\t\tCustomLong8 = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(5)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t(System.Nullable`1[System.Int64])((System.Int64).Call $ldr.GetString(5))\r\n\t\t\t\t\t},\r\n\t\t\t\t\tCustomLong7 = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(6)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t(System.Nullable`1[System.Int64])((System.Int64).Call $ldr.GetString(6))\r\n\t\t\t\t\t},\r\n\t\t\t\t\tCustomLong6 = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(7)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t.New System.Nullable`1[System.Int64]((System.Int64).Call LinqToDB.Common.ConvertBuilder.ConvertDefault(\r\n\t\t\t\t\t\t\t\t(System.Object).Call $ldr.GetGuid(7),\r\n\t\t\t\t\t\t\t\t.Constant<System.RuntimeType>(System.Int64)))\r\n\t\t\t\t\t},\r\n\t\t\t\t\tCustomLong5 = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(8)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t(System.Nullable`1[System.Int64])((System.Int64).Call $ldr.GetString(8))\r\n\t\t\t\t\t},\r\n\t\t\t\t\tCustomLong4 = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(9)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t(System.Nullable`1[System.Int64])(#(System.Int64).Call $ldr.GetBoolean(9))\r\n\t\t\t\t\t},\r\n\t\t\t\t\tCustomLong3 = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(10)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t(System.Nullable`1[System.Int64])(#(System.Int64).Call $ldr.GetBoolean(10))\r\n\t\t\t\t\t},\r\n\t\t\t\t\tCustomLong2 = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(11)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t(System.Nullable`1[System.Int64])((System.Int64).Call $ldr.GetString(11))\r\n\t\t\t\t\t},\r\n\t\t\t\t\tCustomLong1 = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(12)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t(System.Nullable`1[System.Int64])(#(System.Int64).Call $ldr.GetBoolean(12))\r\n\t\t\t\t\t},\r\n\t\t\t\t\tCustomDate9 = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(13)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t.New System.Nullable`1[System.DateTime]((System.DateTime).Call LinqToDB.Common.ConvertBuilder.ConvertDefault(\r\n\t\t\t\t\t\t\t\t(System.Object).Call $ldr.GetBoolean(13),\r\n\t\t\t\t\t\t\t\t.Constant<System.RuntimeType>(System.DateTime)))\r\n\t\t\t\t\t},\r\n\t\t\t\t\tCustomDate8 = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(14)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t.New System.Nullable`1[System.DateTime]((System.DateTime).Call LinqToDB.Common.ConvertBuilder.ConvertDefault(\r\n\t\t\t\t\t\t\t\t(System.Object).Call $ldr.GetBoolean(14),\r\n\t\t\t\t\t\t\t\t.Constant<System.RuntimeType>(System.DateTime)))\r\n\t\t\t\t\t},\r\n\t\t\t\t\tCustomDate7 = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(15)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t.New System.Nullable`1[System.DateTime]((System.DateTime).Call LinqToDB.Common.ConvertBuilder.ConvertDefault(\r\n\t\t\t\t\t\t\t\t(System.Object).Call $ldr.GetBoolean(15),\r\n\t\t\t\t\t\t\t\t.Constant<System.RuntimeType>(System.DateTime)))\r\n\t\t\t\t\t},\r\n\t\t\t\t\tCustomDate6 = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(16)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t.New System.Nullable`1[System.DateTime]((System.DateTime).Call LinqToDB.Common.ConvertBuilder.ConvertDefault(\r\n\t\t\t\t\t\t\t\t(System.Object).Call $ldr.GetBoolean(16),\r\n\t\t\t\t\t\t\t\t.Constant<System.RuntimeType>(System.DateTime)))\r\n\t\t\t\t\t},\r\n\t\t\t\t\tCustomDate5 = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(17)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t.New System.Nullable`1[System.DateTime]((System.DateTime).Call LinqToDB.Common.ConvertBuilder.ConvertDefault(\r\n\t\t\t\t\t\t\t\t(System.Object).Call $ldr.GetBoolean(17),\r\n\t\t\t\t\t\t\t\t.Constant<System.RuntimeType>(System.DateTime)))\r\n\t\t\t\t\t},\r\n\t\t\t\t\tCustomDate4 = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(18)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t.New System.Nullable`1[System.DateTime]((System.DateTime).Call LinqToDB.Common.ConvertBuilder.ConvertDefault(\r\n\t\t\t\t\t\t\t\t(System.Object).Call $ldr.GetBoolean(18),\r\n\t\t\t\t\t\t\t\t.Constant<System.RuntimeType>(System.DateTime)))\r\n\t\t\t\t\t},\r\n\t\t\t\t\tCustomDate3 = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(19)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t.New System.Nullable`1[System.DateTime]((System.DateTime).Call LinqToDB.Common.ConvertBuilder.ConvertDefault(\r\n\t\t\t\t\t\t\t\t(System.Object).Call $ldr.GetBoolean(19),\r\n\t\t\t\t\t\t\t\t.Constant<System.RuntimeType>(System.DateTime)))\r\n\t\t\t\t\t},\r\n\t\t\t\t\tCustomDate2 = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(20)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t.New System.Nullable`1[System.DateTime]((System.DateTime).Call LinqToDB.Common.ConvertBuilder.ConvertDefault(\r\n\t\t\t\t\t\t\t\t(System.Object).Call $ldr.GetBoolean(20),\r\n\t\t\t\t\t\t\t\t.Constant<System.RuntimeType>(System.DateTime)))\r\n\t\t\t\t\t},\r\n\t\t\t\t\tCustomDate1 = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(21)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t.New System.Nullable`1[System.DateTime]((System.DateTime).Call LinqToDB.Common.ConvertBuilder.ConvertDefault(\r\n\t\t\t\t\t\t\t\t(System.Object).Call $ldr.GetBoolean(21),\r\n\t\t\t\t\t\t\t\t.Constant<System.RuntimeType>(System.DateTime)))\r\n\t\t\t\t\t},\r\n\t\t\t\t\tCustomField9 = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(22)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t.Call (.Call $ldr.GetBoolean(22)).ToString()\r\n\t\t\t\t\t},\r\n\t\t\t\t\tCustomField8 = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(23)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t.Call (.Call $ldr.GetBoolean(23)).ToString()\r\n\t\t\t\t\t},\r\n\t\t\t\t\tCustomField7 = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(24)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t.Call (.Call $ldr.GetBoolean(24)).ToString()\r\n\t\t\t\t\t},\r\n\t\t\t\t\tCustomField6 = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(25)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t.Call (.Call $ldr.GetGuid(25)).ToString()\r\n\t\t\t\t\t},\r\n\t\t\t\t\tCustomField5 = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(26)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t.Call (.Call $ldr.GetInt32(26)).ToString()\r\n\t\t\t\t\t},\r\n\t\t\t\t\tCustomField4 = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(27)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t.Call (.Call $ldr.GetGuid(27)).ToString()\r\n\t\t\t\t\t},\r\n\t\t\t\t\tCustomField3 = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(28)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t.Call (.Call $ldr.GetBoolean(28)).ToString()\r\n\t\t\t\t\t},\r\n\t\t\t\t\tCustomField2 = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(29)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t.Call (.Call $ldr.GetBoolean(29)).ToString()\r\n\t\t\t\t\t},\r\n\t\t\t\t\tCustomField1 = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(30)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t.Call (.Call $ldr.GetBoolean(30)).ToString()\r\n\t\t\t\t\t},\r\n\t\t\t\t\tDontTouch = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(31)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tFalse\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t(System.Boolean).Call LinqToDB.Common.ConvertBuilder.ConvertDefault(\r\n\t\t\t\t\t\t\t(System.Object).Call $ldr.GetInt32(31),\r\n\t\t\t\t\t\t\t.Constant<System.RuntimeType>(System.Boolean))\r\n\t\t\t\t\t},\r\n\t\t\t\t\tSegmentation = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(32)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t.Call $ldr.GetString(32)\r\n\t\t\t\t\t},\r\n\t\t\t\t\tLastInventoryCheckTimeStamp = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(33)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t(System.Nullable`1[System.DateTime]).Call System.DateTime.Parse(\r\n\t\t\t\t\t\t\t.Call $ldr.GetString(33),\r\n\t\t\t\t\t\t\tnull,\r\n\t\t\t\t\t\t\t.Constant<System.Globalization.DateTimeStyles>(NoCurrentDateDefault))\r\n\t\t\t\t\t},\r\n\t\t\t\t\tFillingDegree = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(34)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t(System.Nullable`1[System.Decimal])((System.Decimal).Call $ldr.GetString(34))\r\n\t\t\t\t\t},\r\n\t\t\t\t\tErrorMessage = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(35)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t.Call (.Call $ldr.GetGuid(35)).ToString()\r\n\t\t\t\t\t},\r\n\t\t\t\t\tIsVirtual = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(36)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tFalse\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t.Block(System.String $var1) {\r\n\t\t\t\t\t\t\t$var1 = .Call $ldr.GetString(36);\r\n\t\t\t\t\t\t\t.If ($var1.Length == 1) {\r\n\t\t\t\t\t\t\t\t.Call LinqToDB.Common.Converter.ToBoolean(.Call $var1.get_Chars(0))\r\n\t\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t\t.Call System.Boolean.Parse($var1)\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tRearrangementCount = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(37)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\t0\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t(System.Int32).Call $ldr.GetString(37)\r\n\t\t\t\t\t},\r\n\t\t\t\t\tTechnicalValues = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(38)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t.Call $ldr.GetString(38)\r\n\t\t\t\t\t},\r\n\t\t\t\t\tLength = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(39)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t.New System.Nullable`1[System.Decimal]((System.Decimal).Call LinqToDB.Common.ConvertBuilder.ConvertDefault(\r\n\t\t\t\t\t\t\t\t(System.Object).Call $ldr.GetDateTime(39),\r\n\t\t\t\t\t\t\t\t.Constant<System.RuntimeType>(System.Decimal)))\r\n\t\t\t\t\t},\r\n\t\t\t\t\tWidth = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(40)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t(System.Nullable`1[System.Decimal])((System.Decimal).Call $ldr.GetString(40))\r\n\t\t\t\t\t},\r\n\t\t\t\t\tHeight = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(41)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t.New System.Nullable`1[System.Decimal]((System.Decimal).Call LinqToDB.Common.ConvertBuilder.ConvertDefault(\r\n\t\t\t\t\t\t\t\t(System.Object).Call $ldr.GetGuid(41),\r\n\t\t\t\t\t\t\t\t.Constant<System.RuntimeType>(System.Decimal)))\r\n\t\t\t\t\t},\r\n\t\t\t\t\tResourcePointID = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(42)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t.New System.Nullable`1[System.Guid](.Call $ldr.GetGuid(42))\r\n\t\t\t\t\t},\r\n\t\t\t\t\tWashingDate = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(43)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t(System.Nullable`1[System.DateTime]).New System.DateTime((System.Int64).Call $ldr.GetInt32(43))\r\n\t\t\t\t\t},\r\n\t\t\t\t\tLastGlobalTaskID = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(44)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t.New System.Nullable`1[System.Guid](.Call $ldr.GetGuid(44))\r\n\t\t\t\t\t},\r\n\t\t\t\t\tOriginalResourceID = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(45)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t.New System.Nullable`1[System.Guid](.Call $ldr.GetGuid(45))\r\n\t\t\t\t\t},\r\n\t\t\t\t\tLengthClass = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(46)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t.New System.Nullable`1[System.Int32](.Call $ldr.GetInt32(46))\r\n\t\t\t\t\t},\r\n\t\t\t\t\tWidthClass = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(47)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t.New System.Nullable`1[System.Int32]((System.Int32).Call LinqToDB.Common.ConvertBuilder.ConvertDefault(\r\n\t\t\t\t\t\t\t\t(System.Object).Call $ldr.GetGuid(47),\r\n\t\t\t\t\t\t\t\t.Constant<System.RuntimeType>(System.Int32)))\r\n\t\t\t\t\t},\r\n\t\t\t\t\tCurrentWeightOfResource = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(48)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t.New System.Nullable`1[System.Decimal]((System.Decimal).Call LinqToDB.Common.ConvertBuilder.ConvertDefault(\r\n\t\t\t\t\t\t\t\t(System.Object).Call $ldr.GetGuid(48),\r\n\t\t\t\t\t\t\t\t.Constant<System.RuntimeType>(System.Decimal)))\r\n\t\t\t\t\t},\r\n\t\t\t\t\tHeightClass = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(49)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t.New System.Nullable`1[System.Int32](.Call $ldr.GetInt32(49))\r\n\t\t\t\t\t},\r\n\t\t\t\t\tTypeID = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(50)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t.New System.Nullable`1[System.Guid]((System.Guid).Call LinqToDB.Common.ConvertBuilder.ConvertDefault(\r\n\t\t\t\t\t\t\t\t(System.Object).Call $ldr.GetInt32(50),\r\n\t\t\t\t\t\t\t\t.Constant<System.RuntimeType>(System.Guid)))\r\n\t\t\t\t\t},\r\n\t\t\t\t\tParentResourceID = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(51)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t.New System.Nullable`1[System.Guid]((System.Guid).Call LinqToDB.Common.ConvertBuilder.ConvertDefault(\r\n\t\t\t\t\t\t\t\t(System.Object).Call $ldr.GetInt32(51),\r\n\t\t\t\t\t\t\t\t.Constant<System.RuntimeType>(System.Guid)))\r\n\t\t\t\t\t},\r\n\t\t\t\t\tResourceLabelNVE = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(52)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t.Call (.Call $ldr.GetInt32(52)).ToString()\r\n\t\t\t\t\t},\r\n\t\t\t\t\tResourceLabel = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(53)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tnull\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t.Call (.Call $ldr.GetInt32(53)).ToString()\r\n\t\t\t\t\t},\r\n\t\t\t\t\tStatus = .If (\r\n\t\t\t\t\t\t.Call $ldr.IsDBNull(54)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\t.Constant<MCC.WMS.ServiceInterfaces.Enums.ResourceStatus>(Undefined)\r\n\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t(MCC.WMS.ServiceInterfaces.Enums.ResourceStatus).Call $ldr.GetInt32(54)\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t$WmsResourceTypeDTO2 = .If (\r\n\t\t\t\t.Call $rd.IsDBNull(0)\r\n\t\t\t) {\r\n\t\t\t\tnull\r\n\t\t\t} .Else {\r\n\t\t\t\t(MCC.WMS.ServiceInterfaces.DTO.WmsResourceTypeDTO).Call LinqToDB.Linq.Builder.TableBuilder+TableContext.OnEntityCreated(\r\n\t\t\t\t\t$dctx,\r\n\t\t\t\t\t.New MCC.WMS.ServiceInterfaces.DTO.WmsResourceTypeDTO(){\r\n\t\t\t\t\t\tId = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(0)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t.Constant<System.Guid>(00000000-0000-0000-0000-000000000000)\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetGuid(0)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tExtensionData = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(1)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tnull\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetString(1)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tWidth = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(2)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t0\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetInt32(2)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tDepth = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(3)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t0\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetInt32(3)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tHeight = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(4)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t0\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetInt32(4)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tShortName = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(5)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tnull\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetString(5)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tName = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(6)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tnull\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetString(6)\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t})\r\n\t\t\t};\r\n\t\t\t$WmsResourcePointDTO3 = .If (\r\n\t\t\t\t.Call $rd.IsDBNull(7)\r\n\t\t\t) {\r\n\t\t\t\tnull\r\n\t\t\t} .Else {\r\n\t\t\t\t(MCC.WMS.ServiceInterfaces.DTO.WmsResourcePointDTO).Call LinqToDB.Linq.Builder.TableBuilder+TableContext.OnEntityCreated(\r\n\t\t\t\t\t$dctx,\r\n\t\t\t\t\t.New MCC.WMS.ServiceInterfaces.DTO.WmsResourcePointDTO(){\r\n\t\t\t\t\t\tId = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(7)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t.Constant<System.Guid>(00000000-0000-0000-0000-000000000000)\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetGuid(7)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tExtensionData = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(8)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tnull\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetString(8)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tDontCreateGTsAuto = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(9)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tFalse\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetBoolean(9)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tIsInventoryPlace = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(10)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tFalse\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetBoolean(10)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tBarcode = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(11)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tnull\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetString(11)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tIsPalletChangeAllowed = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(12)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tFalse\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetBoolean(12)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tNewResourceRemovesOld = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(13)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tFalse\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetBoolean(13)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tIsStorageZoneGroupPoint = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(14)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tFalse\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetBoolean(14)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tIsVirtual = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(15)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tFalse\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetBoolean(15)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tIsExitPlace = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(16)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tFalse\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetBoolean(16)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tWaitForResourceLeftSystem = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(17)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tFalse\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetBoolean(17)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tIsCommissioningTarget = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(18)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tFalse\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetBoolean(18)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tIsCommissioningPlace = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(19)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tFalse\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetBoolean(19)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tIsPreparationLane = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(20)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tFalse\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetBoolean(20)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tIsOutfeedPoint = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(21)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tFalse\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetBoolean(21)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tIsShelfAssignmentPoint = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(22)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tFalse\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetBoolean(22)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tIsSrm = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(23)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tFalse\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetBoolean(23)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tIsInfeedPoint = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(24)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tFalse\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetBoolean(24)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tStorageZoneID = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(25)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tnull\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.New System.Nullable`1[System.Guid](.Call $ldr.GetGuid(25))\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tOperatingMode = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(26)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t0\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetInt32(26)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tPlantID = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(27)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t.Constant<System.Guid>(00000000-0000-0000-0000-000000000000)\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetGuid(27)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tIsMessagePoint = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(28)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tFalse\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetBoolean(28)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tMFCControlled = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(29)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tFalse\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetBoolean(29)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tOutOfOrder = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(30)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tFalse\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetBoolean(30)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tMaxCapacityPerResource = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(31)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tnull\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.New System.Nullable`1[System.Int32](.Call $ldr.GetInt32(31))\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tHostName = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(32)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tnull\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetString(32)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tDescription = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(33)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tnull\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetString(33)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tResourcePointName = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(34)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tnull\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetString(34)\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t})\r\n\t\t\t};\r\n\t\t\t$StorageShelfDTO4 = .If (\r\n\t\t\t\t.Call $rd.IsDBNull(35)\r\n\t\t\t) {\r\n\t\t\t\tnull\r\n\t\t\t} .Else {\r\n\t\t\t\t(MCC.WMS.ServiceInterfaces.DTO.StorageShelfDTO).Call LinqToDB.Linq.Builder.TableBuilder+TableContext.OnEntityCreated(\r\n\t\t\t\t\t$dctx,\r\n\t\t\t\t\t.New MCC.WMS.ServiceInterfaces.DTO.StorageShelfDTO(){\r\n\t\t\t\t\t\tId = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(35)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t.Constant<System.Guid>(00000000-0000-0000-0000-000000000000)\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetGuid(35)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tExtensionData = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(36)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tnull\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetString(36)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tBarcode = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(37)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tnull\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetString(37)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tHostName = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(38)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tnull\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetString(38)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tModifiedTimeStamp = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(39)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t.Constant<System.DateTime>(01.01.0001 00:00:00)\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call System.DateTime.SpecifyKind(\r\n\t\t\t\t\t\t\t\t.Call $ldr.GetDateTime(39),\r\n\t\t\t\t\t\t\t\t.Constant<System.DateTimeKind>(Utc))\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tCategoryABC = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(40)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tnull\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetString(40)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tPlantID = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(41)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t.Constant<System.Guid>(00000000-0000-0000-0000-000000000000)\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetGuid(41)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tStorageZoneID = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(42)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tnull\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.New System.Nullable`1[System.Guid](.Call $ldr.GetGuid(42))\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tStoragePlaceType = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(43)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t0\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetInt32(43)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tStorageFieldID = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(44)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tnull\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.New System.Nullable`1[System.Guid](.Call $ldr.GetGuid(44))\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tChannelID = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(45)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t.Constant<System.Guid>(00000000-0000-0000-0000-000000000000)\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetGuid(45)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tAisleNumber = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(46)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t0\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetInt32(46)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tAisleID = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(47)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t.Constant<System.Guid>(00000000-0000-0000-0000-000000000000)\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetGuid(47)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tStorageRackID = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(48)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t.Constant<System.Guid>(00000000-0000-0000-0000-000000000000)\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetGuid(48)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tHeight = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(49)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tnull\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.New System.Nullable`1[System.Int32](.Call $ldr.GetInt32(49))\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tDepthCoordinate = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(50)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t0\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetInt32(50)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tSide = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(51)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t.Constant<MCC.ConnectorsV2.WMSConnectorServiceInterfaces.Enums.SideDefinition>(Undefined)\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t(MCC.ConnectorsV2.WMSConnectorServiceInterfaces.Enums.SideDefinition).Call $ldr.GetInt32(51)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tPositionY = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(52)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t0\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetInt32(52)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tPositionXp = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(53)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t0\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetInt32(53)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tPositionX = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(54)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t0\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t.Call $ldr.GetInt32(54)\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tStatus = .If (\r\n\t\t\t\t\t\t\t.Call $ldr.IsDBNull(55)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t.Constant<MCC.WMS.ServiceInterfaces.Enums.StorageShelfStatus>(Available)\r\n\t\t\t\t\t\t} .Else {\r\n\t\t\t\t\t\t\t(MCC.WMS.ServiceInterfaces.Enums.StorageShelfStatus).Call $ldr.GetInt32(55)\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t})\r\n\t\t\t};\r\n\t\t\t$WmsResourceCombinedDTO5 = .New MCC.WMS.ServiceInterfaces.DTO.WmsResourceCombinedDTO(){\r\n\t\t\t\tLoadCarrier = $WmsLoadCarrierDTO1,\r\n\t\t\t\tResourceType = .If (\r\n\t\t\t\t\t.Call $rd.IsDBNull(0)\r\n\t\t\t\t) {\r\n\t\t\t\t\tnull\r\n\t\t\t\t} .Else {\r\n\t\t\t\t\t$WmsResourceTypeDTO2\r\n\t\t\t\t},\r\n\t\t\t\tResourcePoint = .If (\r\n\t\t\t\t\t.Call $rd.IsDBNull(7)\r\n\t\t\t\t) {\r\n\t\t\t\t\tnull\r\n\t\t\t\t} .Else {\r\n\t\t\t\t\t$WmsResourcePointDTO3\r\n\t\t\t\t},\r\n\t\t\t\tStorageShelf = .If (\r\n\t\t\t\t\t.Call $rd.IsDBNull(35)\r\n\t\t\t\t) {\r\n\t\t\t\t\tnull\r\n\t\t\t\t} .Else {\r\n\t\t\t\t\t$StorageShelfDTO4\r\n\t\t\t\t},\r\n\t\t\t\tReservations = .If (\r\n\t\t\t\t\t.Call $ldr.IsDBNull(56)\r\n\t\t\t\t) {\r\n\t\t\t\t\t0\r\n\t\t\t\t} .Else {\r\n\t\t\t\t\t.Call $ldr.GetInt32(56)\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\t$WmsResourceCombinedDTO5\r\n\t\t}\r\n\t}\r\n\r\nthe produced sql looks like this:\r\n\r\n\t-- MLog_MCC_Connection SqlServer.2012\r\n\tSELECT\r\n\t\t[tpList].[ID],\r\n\t\t[tpList].[ExtensionData],\r\n\t\t[tpList].[Width],\r\n\t\t[tpList].[Depth] as [Depth1],\r\n\t\t[tpList].[Height],\r\n\t\t[tpList].[ShortName],\r\n\t\t[tpList].[Name],\r\n\t\t[pointList].[ID] as [ID1],\r\n\t\t[pointList].[ExtensionData] as [ExtensionData1],\r\n\t\t[pointList].[DontCreateGTsAuto],\r\n\t\t[pointList].[IsInventoryPlace],\r\n\t\t[pointList].[Barcode],\r\n\t\t[pointList].[IsPalletChangeAllowed],\r\n\t\t[pointList].[NewResourceRemovesOld],\r\n\t\t[pointList].[IsStoZoneGroupPoint],\r\n\t\t[pointList].[IsVirtual],\r\n\t\t[pointList].[IsExitPlace],\r\n\t\t[pointList].[WaitFResLeftSystem],\r\n\t\t[pointList].[IsCommissioningTarget],\r\n\t\t[pointList].[IsCommissioningPlace],\r\n\t\t[pointList].[IsPreparationLane],\r\n\t\t[pointList].[IsOutfeedPoint],\r\n\t\t[pointList].[IsShelfAssignmentPoint],\r\n\t\t[pointList].[IsSrm],\r\n\t\t[pointList].[IsInfeedPoint],\r\n\t\t[pointList].[StorageZoneID],\r\n\t\t[pointList].[OperatingMode],\r\n\t\t[pointList].[PlantID],\r\n\t\t[pointList].[IsMessagePoint],\r\n\t\t[pointList].[MFCControlled],\r\n\t\t[pointList].[OutOfOrder],\r\n\t\t[pointList].[MaxCapacityPerResource],\r\n\t\t[pointList].[HostName],\r\n\t\t[pointList].[Description],\r\n\t\t[pointList].[ResourcePointName],\r\n\t\t[ssn].[ID] as [ID2],\r\n\t\t[ssn].[ExtensionData] as [ExtensionData2],\r\n\t\t[ssn].[Barcode] as [Barcode1],\r\n\t\t[ssn].[HostName] as [HostName1],\r\n\t\t[ssn].[ModifiedTimeStamp],\r\n\t\t[ssn].[CategoryABC],\r\n\t\t[ssn].[PlantID] as [PlantID1],\r\n\t\t[ssn].[StorageZoneID] as [StorageZoneID1],\r\n\t\t[ssn].[StoragePlaceType],\r\n\t\t[ssn].[StorageFieldID],\r\n\t\t[ssn].[ChannelID],\r\n\t\t[ssn].[AisleNumber],\r\n\t\t[ssn].[AisleID],\r\n\t\t[ssn].[StorageRackID],\r\n\t\t[ssn].[Height] as [Height1],\r\n\t\t[ssn].[DepthCoordinate],\r\n\t\t[ssn].[Side],\r\n\t\t[ssn].[PositionY],\r\n\t\t[ssn].[PositionXp],\r\n\t\t[ssn].[PositionX],\r\n\t\t[ssn].[Status],\r\n\t\t(\r\n\t\t\tSELECT\r\n\t\t\t\tCount(*)\r\n\t\t\tFROM\r\n\t\t\t\t[WMS_Ref_OutfeedResource] [t1]\r\n\t\t\tWHERE\r\n\t\t\t\t[res].[ID3] = [t1].[ResourceID]\r\n\t\t) as [c1]\r\n\tFROM\r\n\t\t(\r\n\t\t\tSELECT\r\n\t\t\t\t[t2].[ID] as [ID3],\r\n\t\t\t\t[t2].[ExtensionData] as [ExtensionData3],\r\n\t\t\t\t[t2].[ModifiedTimeStamp] as [ModifiedTimeStamp1],\r\n\t\t\t\t[t2].[CreationDate],\r\n\t\t\t\t[t2].[CustomLong9],\r\n\t\t\t\t[t2].[CustomLong8],\r\n\t\t\t\t[t2].[CustomLong7],\r\n\t\t\t\t[t2].[CustomLong6],\r\n\t\t\t\t[t2].[CustomLong5],\r\n\t\t\t\t[t2].[CustomLong4],\r\n\t\t\t\t[t2].[CustomLong3],\r\n\t\t\t\t[t2].[CustomLong2],\r\n\t\t\t\t[t2].[CustomLong1],\r\n\t\t\t\t[t2].[CustomDate9],\r\n\t\t\t\t[t2].[CustomDate8],\r\n\t\t\t\t[t2].[CustomDate7],\r\n\t\t\t\t[t2].[CustomDate6],\r\n\t\t\t\t[t2].[CustomDate5],\r\n\t\t\t\t[t2].[CustomDate4],\r\n\t\t\t\t[t2].[CustomDate3],\r\n\t\t\t\t[t2].[CustomDate2],\r\n\t\t\t\t[t2].[CustomDate1],\r\n\t\t\t\t[t2].[CustomField9],\r\n\t\t\t\t[t2].[CustomField8],\r\n\t\t\t\t[t2].[CustomField7],\r\n\t\t\t\t[t2].[CustomField6],\r\n\t\t\t\t[t2].[CustomField5],\r\n\t\t\t\t[t2].[CustomField4],\r\n\t\t\t\t[t2].[CustomField3],\r\n\t\t\t\t[t2].[CustomField2],\r\n\t\t\t\t[t2].[CustomField1],\r\n\t\t\t\t[t2].[DontTouch],\r\n\t\t\t\t[t2].[Segmentation],\r\n\t\t\t\t[t2].[LastInventoryCheckTimeStamp] as [c2],\r\n\t\t\t\t[t2].[FillingDegree],\r\n\t\t\t\t[t2].[ErrorMessage],\r\n\t\t\t\t[t2].[IsVirtual] as [IsVirtual1],\r\n\t\t\t\t[t2].[RearrangementCount],\r\n\t\t\t\t[t2].[TechnicalValues],\r\n\t\t\t\t[t2].[Length] as [Length1],\r\n\t\t\t\t[t2].[Width] as [Width1],\r\n\t\t\t\t[t2].[Height] as [Height2],\r\n\t\t\t\t[t2].[ResourcePointID],\r\n\t\t\t\t[t2].[WashingDate],\r\n\t\t\t\t[t2].[LastGlobalTaskID],\r\n\t\t\t\t[t2].[OriginalResourceID],\r\n\t\t\t\t[t2].[LengthClass],\r\n\t\t\t\t[t2].[WidthClass],\r\n\t\t\t\t[t2].[CurrentWeightOfResource],\r\n\t\t\t\t[t2].[HeightClass],\r\n\t\t\t\t[t2].[TypeID],\r\n\t\t\t\t[t2].[ParentResourceID],\r\n\t\t\t\t[t2].[ResourceLabelNVE],\r\n\t\t\t\t[t2].[ResourceLabel],\r\n\t\t\t\t[t2].[Status] as [Status1]\r\n\t\t\tFROM\r\n\t\t\t\t[WMS_Resource] [t2]\r\n\t\t\tUNION\r\n\t\t\tSELECT\r\n\t\t\t\t[t3].[ID] as [ID3],\r\n\t\t\t\t[t3].[ExtensionData] as [ExtensionData3],\r\n\t\t\t\t[t3].[ModifiedTimeStamp] as [ModifiedTimeStamp1],\r\n\t\t\t\t[t3].[CreationDate],\r\n\t\t\t\t[t3].[CustomLong9],\r\n\t\t\t\t[t3].[CustomLong8],\r\n\t\t\t\t[t3].[CustomLong7],\r\n\t\t\t\t[t3].[CustomLong6],\r\n\t\t\t\t[t3].[CustomLong5],\r\n\t\t\t\t[t3].[CustomLong4],\r\n\t\t\t\t[t3].[CustomLong3],\r\n\t\t\t\t[t3].[CustomLong2],\r\n\t\t\t\t[t3].[CustomLong1],\r\n\t\t\t\t[t3].[CustomDate9],\r\n\t\t\t\t[t3].[CustomDate8],\r\n\t\t\t\t[t3].[CustomDate7],\r\n\t\t\t\t[t3].[CustomDate6],\r\n\t\t\t\t[t3].[CustomDate5],\r\n\t\t\t\t[t3].[CustomDate4],\r\n\t\t\t\t[t3].[CustomDate3],\r\n\t\t\t\t[t3].[CustomDate2],\r\n\t\t\t\t[t3].[CustomDate1],\r\n\t\t\t\t[t3].[CustomField9],\r\n\t\t\t\t[t3].[CustomField8],\r\n\t\t\t\t[t3].[CustomField7],\r\n\t\t\t\t[t3].[CustomField6],\r\n\t\t\t\t[t3].[CustomField5],\r\n\t\t\t\t[t3].[CustomField4],\r\n\t\t\t\t[t3].[CustomField3],\r\n\t\t\t\t[t3].[CustomField2],\r\n\t\t\t\t[t3].[CustomField1],\r\n\t\t\t\t[t3].[DontTouch],\r\n\t\t\t\t[t3].[Segmentation],\r\n\t\t\t\t[t3].[LastInventoryCheckTimeStamp] as [c2],\r\n\t\t\t\t[t3].[FillingDegree],\r\n\t\t\t\t[t3].[ErrorMessage],\r\n\t\t\t\t[t3].[IsVirtual] as [IsVirtual1],\r\n\t\t\t\t[t3].[RearrangementCount],\r\n\t\t\t\t[t3].[TechnicalValues],\r\n\t\t\t\t[t3].[Length] as [Length1],\r\n\t\t\t\t[t3].[Width] as [Width1],\r\n\t\t\t\t[t3].[Height] as [Height2],\r\n\t\t\t\t[t3].[ResourcePointID],\r\n\t\t\t\t[t3].[WashingDate],\r\n\t\t\t\t[t3].[LastGlobalTaskID],\r\n\t\t\t\t[t3].[OriginalResourceID],\r\n\t\t\t\t[t3].[LengthClass],\r\n\t\t\t\t[t3].[WidthClass],\r\n\t\t\t\t[t3].[CurrentWeightOfResource],\r\n\t\t\t\t[t3].[HeightClass],\r\n\t\t\t\t[t3].[TypeID],\r\n\t\t\t\t[t3].[ParentResourceID],\r\n\t\t\t\t[t3].[ResourceLabelNVE],\r\n\t\t\t\t[t3].[ResourceLabel],\r\n\t\t\t\t[t3].[Status] as [Status1]\r\n\t\t\tFROM\r\n\t\t\t\t[WMS_ResourceA] [t3]\r\n\t\t) [res]\r\n\t\t\tLEFT JOIN [WMS_ResourceType] [tpList] ON [res].[TypeID] = [tpList].[ID]\r\n\t\t\tLEFT JOIN [WMS_ResourcePoint] [pointList] ON [res].[ResourcePointID] = [pointList].[ID]\r\n\t\t\tLEFT JOIN [WMS_Ref_ResourceStorageShelf] [rssn] ON [res].[ID3] = [rssn].[ResourceID]\r\n\t\t\tLEFT JOIN [WMS_StorageShelf] [ssn] ON [rssn].[StorageShelfID] = [ssn].[ID]\r\n\r\nas you can see, field 5 from the DataReader is used for a string and also an int! But the columns from the other table are only used for a count, so they need no mapping"},"comment":{"url":"https://api.github.com/repos/linq2db/linq2db/issues/comments/440235290","html_url":"https://github.com/linq2db/linq2db/issues/1412#issuecomment-440235290","issue_url":"https://api.github.com/repos/linq2db/linq2db/issues/1412","id":440235290,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MDIzNTI5MA==","user":{"login":"MaceWindu","id":1099238,"node_id":"MDQ6VXNlcjEwOTkyMzg=","avatar_url":"https://avatars1.githubusercontent.com/u/1099238?v=4","gravatar_id":"","url":"https://api.github.com/users/MaceWindu","html_url":"https://github.com/MaceWindu","followers_url":"https://api.github.com/users/MaceWindu/followers","following_url":"https://api.github.com/users/MaceWindu/following{/other_user}","gists_url":"https://api.github.com/users/MaceWindu/gists{/gist_id}","starred_url":"https://api.github.com/users/MaceWindu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaceWindu/subscriptions","organizations_url":"https://api.github.com/users/MaceWindu/orgs","repos_url":"https://api.github.com/users/MaceWindu/repos","events_url":"https://api.github.com/users/MaceWindu/events{/privacy}","received_events_url":"https://api.github.com/users/MaceWindu/received_events","type":"User","site_admin":false},"created_at":"2018-11-20T11:07:25Z","updated_at":"2018-11-20T11:07:25Z","author_association":"CONTRIBUTOR","body":"Nugets published and will appear on nuget soon"}}
{"actor":{"display_login":"MaceWindu"}}