{"action":"created","issue":{"url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/1459","repository_url":"https://api.github.com/repos/AutoMapper/AutoMapper","labels_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/1459/labels{/name}","comments_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/1459/comments","events_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/1459/events","html_url":"https://github.com/AutoMapper/AutoMapper/issues/1459","id":164038408,"number":1459,"title":"Byte array conversion throw System.NotSupported Exception","user":{"login":"atul221282","id":4570393,"avatar_url":"https://avatars.githubusercontent.com/u/4570393?v=3","gravatar_id":"","url":"https://api.github.com/users/atul221282","html_url":"https://github.com/atul221282","followers_url":"https://api.github.com/users/atul221282/followers","following_url":"https://api.github.com/users/atul221282/following{/other_user}","gists_url":"https://api.github.com/users/atul221282/gists{/gist_id}","starred_url":"https://api.github.com/users/atul221282/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atul221282/subscriptions","organizations_url":"https://api.github.com/users/atul221282/orgs","repos_url":"https://api.github.com/users/atul221282/repos","events_url":"https://api.github.com/users/atul221282/events{/privacy}","received_events_url":"https://api.github.com/users/atul221282/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-07-06T09:48:22Z","updated_at":"2016-07-07T09:03:19Z","closed_at":null,"body":"In Entityframework code first I have classes with timestamp field to maintain coincurrency when I am trying to retrieve data  without AuotMapper mapping it work fibe but when I try to use mapping then it produce System.NotSupported Exception in my output window. My mapping code is below\r\n\r\n ```\r\nMapper.Initialize(cfg =>\r\n            {\r\n                cfg.CreateMap<ClientPhone, ClientPhoneViewModel>();\r\n                cfg.CreateMap<ClientRecord, ClientRecordViewModel>();\r\n            });\r\n\r\n            Mapper.Map<ClientPhone, ClientPhoneViewModel>(new ClientPhone());\r\n            Mapper.Map<ClientRecord, ClientRecordViewModel>(new ClientRecord());\r\n\r\n//My viewmodel classess\r\npublic abstract class BaseViewModel\r\n    {\r\n        public int Id { get; set; }\r\n        public byte[] RowVersion { get; set; }\r\n\r\n    }\r\n\r\n public class ClientRecordViewModel : BaseViewModel\r\n    {\r\n        public string Name { get; set; }\r\n        public string Address { get; set; }\r\n\r\n        public ICollection<ClientPhoneViewModel> ClientPhones { get; set; }\r\n    }\r\n\r\n public class ClientPhoneViewModel:BaseViewModel\r\n    {\r\n        public string ClientRecordName { get; set; }\r\n        public string PhoneNumberNumber { get; set; }\r\n\r\n        public int ClientRecordId { get; set; }\r\n\r\n        public int PhoneNumberId { get; set; }\r\n\r\n    }\r\n\r\n\r\n\r\nmy query to access it which throws an exception\r\n` sdUow.ClientRecords.GetAll().ProjectTo<ClientRecordViewModel>().ToList();`\r\n\r\nIf i remove  RowVersion from baseviewmodel it works then\r\n\r\nFollowing is the error I am getting\r\n\r\nLINQ to Entities does not recognize the method 'Byte[] ToArray[Byte](System.Collections.Generic.IEnumerable`1[System.Byte])' method, and this method cannot be translated into a store expression."},"comment":{"url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/comments/231023019","html_url":"https://github.com/AutoMapper/AutoMapper/issues/1459#issuecomment-231023019","issue_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/1459","id":231023019,"user":{"login":"lbargaoanu","id":4517428,"avatar_url":"https://avatars.githubusercontent.com/u/4517428?v=3","gravatar_id":"","url":"https://api.github.com/users/lbargaoanu","html_url":"https://github.com/lbargaoanu","followers_url":"https://api.github.com/users/lbargaoanu/followers","following_url":"https://api.github.com/users/lbargaoanu/following{/other_user}","gists_url":"https://api.github.com/users/lbargaoanu/gists{/gist_id}","starred_url":"https://api.github.com/users/lbargaoanu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lbargaoanu/subscriptions","organizations_url":"https://api.github.com/users/lbargaoanu/orgs","repos_url":"https://api.github.com/users/lbargaoanu/repos","events_url":"https://api.github.com/users/lbargaoanu/events{/privacy}","received_events_url":"https://api.github.com/users/lbargaoanu/received_events","type":"User","site_admin":false},"created_at":"2016-07-07T09:03:19Z","updated_at":"2016-07-07T09:03:19Z","body":"This can be closed."}}
{"actor":{"display_login":"lbargaoanu"}}