{"action":"opened","issue":{"url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/677","labels_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/677/labels{/name}","comments_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/677/comments","events_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/677/events","html_url":"https://github.com/AutoMapper/AutoMapper/issues/677","id":56797680,"number":677,"title":"ProjectUsing is not called.","user":{"login":"RyanONeill1970","id":1757324,"avatar_url":"https://avatars.githubusercontent.com/u/1757324?v=3","gravatar_id":"","url":"https://api.github.com/users/RyanONeill1970","html_url":"https://github.com/RyanONeill1970","followers_url":"https://api.github.com/users/RyanONeill1970/followers","following_url":"https://api.github.com/users/RyanONeill1970/following{/other_user}","gists_url":"https://api.github.com/users/RyanONeill1970/gists{/gist_id}","starred_url":"https://api.github.com/users/RyanONeill1970/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RyanONeill1970/subscriptions","organizations_url":"https://api.github.com/users/RyanONeill1970/orgs","repos_url":"https://api.github.com/users/RyanONeill1970/repos","events_url":"https://api.github.com/users/RyanONeill1970/events{/privacy}","received_events_url":"https://api.github.com/users/RyanONeill1970/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-06T10:52:31Z","updated_at":"2015-02-06T10:52:31Z","closed_at":null,"body":"In the following unit test the expression inside ProjectUsing is never called (AlternateId is not set), this is the same when executed via Entity Framework. Should this work or is there something missing from my example?\r\n\r\n    class MapFrom\r\n    {\r\n        public int Id { get; set; }\r\n    }\r\n    class MapTo\r\n    {\r\n        public int AlternateId { get; set; }\r\n    }\r\n\r\n    [TestMethod]\r\n    public void Automapper_projectusing_test()\r\n    {\r\n        AutoMapper\r\n            .Mapper\r\n            .CreateMap<MapFrom, MapTo>()\r\n            .ProjectUsing(src => new MapTo { AlternateId = 88 });\r\n        var products = new List<MapFrom>();\r\n        products.Add(new MapFrom());\r\n\r\n        var mapped = products\r\n            .AsQueryable()    // Just in case ProjectUsing only works with IQueryable.\r\n            .Project()\r\n            .To<MapTo>()\r\n            .ToList();\r\n\r\n        Assert.AreEqual(88, mapped.Single().AlternateId); // Fails, AlternateId equals 0.\r\n    }\r\n\r\n"}}