Up to now, when working with WCF, I have always been exposing the whole either EF generated entities, or POCOs(by modifying the T4 template to include DataContract and DataM
I would go with option 1 -> AutoMapper.
it does not work as it cannot do a two way mapping.
You could define two way mapping:
Mapper.CreateMap<Product, ProductContract>();
Mapper.CreateMap<ProductContract, Product>();
obviously if in your ProductContract
you have less properties than in your domain model when doing the mapping, only the corresponding properties will be populated.
When doing the inverse map for updating you could do the following:
ProductContract pc = ...
Product productToUpdate = GetProduct(pc.Id);
Mapper.Map<ProductContract, Product>(pc, product);
// at this stage the product model will have the properties that
// were present in the ProductContract being mapped from them and
// the rest of the properties will stay unmodified, i.e. they will
// have their initial values that were retrieved from the database.
// Now we can update the product:
UpdateProduct(product);
First of all you should never expose the whole entity as a data contract, as it is a domain object, not the data transfer object. Not just in that particular situation. Never. Now you're creating a confusing inconsistency between entities which do have a DTO and those which don't.
Returning to a question: AutoMapper seems to be pretty ok. You just have to define 2 mappings. And probably Ignore() missing properties when mapping back to entity.