C#C
C#4y ago
İrşat

Foreach vs Count with likes table

Guys I made a Vote(likes and dislikes) table. It's similar to reddit's karma system. Dislikes decrease the likes. So far so good but now I am using foreach to check if vote is True or False and do the calculation. Would it be faster if i made a two different table and just use likes.Count - dislikes.Count instead?
Was this page helpful?