{"issue":{"state":"open","pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"user":{"avatar_url":"https://secure.gravatar.com/avatar/5be82594d3f9c662d72d19d957b79c72?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"5be82594d3f9c662d72d19d957b79c72","url":"https://api.github.com/users/cblaze22","login":"cblaze22","id":556494},"milestone":null,"assignee":null,"updated_at":"2011-11-07T23:27:00Z","labels":[],"comments":2,"closed_at":null,"url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/126","body":"I didnt have this problem before with older versions of EF or Linq to SQL, but I can't map a DTO to an already existing domain object anymore without it erroring on save/update.  It is because of the dynamically added properties on the domain objects.  I used UseDefaultValue, and my properties arent mapping either.\r\n\r\n            Mapper.CreateMap<AddressModel, Address>()\r\n                .ForAllMembers(q => q.UseDestinationValue());\r\n\r\n            var gymMap = Mapper.CreateMap<GymModel, Gym>();\r\n            gymMap.ForAllMembers(q => q.UseDestinationValue());\r\n            gymMap.ForMember(d => d.Address, o => o.UseDestinationValue());\r\n            Mapper.Map(model, item);\r\n\r\nItem above doesnt contain the new properties of model in the subproperty address.\r\n\r\n    [Table(\"Address\", Schema = \"GrassrootsHoops\")]\r\n    public class Address\r\n    {\r\n        [Key]\r\n        public int Id { get; set; }\r\n        public string Location { get; set; }\r\n        public string StreetAddress { get; set; }\r\n        public string ExtendedAddress { get; set; }\r\n        public string City { get; set; }\r\n        public string StateRegion { get; set; }\r\n        public string PostalCode { get; set; }\r\n        public string Country { get; set; }\r\n\r\n        public double? Latitude { get; set; }\r\n        public double? Longitude { get; set; }\r\n    }\r\n\r\n        public class AddressModel : IAddressModel\r\n        {\r\n        public int Id { get; set; }\r\n        public string Location { get; set; }\r\n        public string StreetAddress { get; set; }\r\n        public string ExtendedAddress { get; set; }\r\n        public string City { get; set; }\r\n        public string StateRegion { get; set; }\r\n        public string PostalCode { get; set; }\r\n        public string Country { get; set; }\r\n\r\n        public double? Latitude { get; set; }\r\n        public double? Longitude { get; set; }\r\n","html_url":"https://github.com/AutoMapper/AutoMapper/issues/126","title":"Entity Framework Code First 4.1 Mapping Issues","number":126,"id":1732841,"created_at":"2011-09-25T07:10:25Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/5be82594d3f9c662d72d19d957b79c72?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"5be82594d3f9c662d72d19d957b79c72","url":"https://api.github.com/users/cblaze22","login":"cblaze22","id":556494},"updated_at":"2011-11-07T23:27:00Z","url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/comments/2661550","body":"Yep it did but I got rid of it, but EF entities are still not working correctly.  I have to do some manually mapping to get it to work correctly.","id":2661550,"created_at":"2011-11-07T23:27:00Z"}}