I'm building an ecommerce site with products being in multiple categories. As a result of this I've got a Products table, a Categories table and a ProdCat linking / junction table that contains all the productId / CategoryId combinations.
When performing an update using Linq To Entities (which I'm using today for the first time) I'm at a loss. I first need to delete all entries for a given product Id and then perform an insert of all the relevant details. I think I have the insert down but can anyone give me an example of how to do the delete?
I've trawled the net and it seems the Linq to Entities is considered the 'way forward' in terms of it versus Linq To SQL but it also seems that it's not as 'easy' to learn as Linq To Sql.
Any help is appreciated.
Thanks.