asp.net - How do I deal with the quantity column of a junction table using sql to entities -
I have 3 tables There are many links to blogs and tags There is a junction table with blog tag volume columns.
** Blog ** Blog ID Title ** Tag ** TagInd Name ** BlogTag ** Blog ID TagIntinity
I'm not sure that I How do I handle columns?
Thanks
OK, you will need to calculate the amount :
var q = (In context B to select blogs where B. Blog tag. Ani (t = & gt; gt; tigid == some id) Select b) .count () ;
Then you:
add 1 blog 2. SaveChanges 3. For each tag on the new blog: 1. Calculate the quantity, as above 2. Update BlogTag.Quantity 4. SaveChanges
Comments
Post a Comment