Hello,
I have a "Product" entity. A Product can have several "ProductDetail".
I do this : product.AddDetail(new ProductDetail());
The code is :
public virtual void AddDetail(ProductDetail productDetail)
{
productDetail.Product = this;
ProductDetails.Add(productDetail);
}
When I save no problem, the Product and ProductDetail are save.
When I remove a "ProductDetail", I do this :
product.RemoveDetail(myProductDetail);
The code is :
public virtual void RemoveDetail(ProductDetail productDetail)
{
ProductDetails = (from p in ProductDetails where p.Id !=
productDetail.Id select p).ToList<ProductDetail>();
}
The "ProductDetails" has the right content but when I update, I don't
see inb NHProf any Delete.
It's probably a trouble in the mapping file but I don't find the right
configuration
The mapping : http://pastebin.com/muaCXMvu
The C# code : http://pastebin.com/YNeyjkJa
Any idea ?
Thanks,
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.