I am assuming that you have a collection class called
BookTopic
. Then here is what the SQL query will look like in LINQ.
int count = (from bt in new BookTopic()
where !bt.TopicId.Equals(1) && bt.Topic.Equals("abc")
select bt).ToList().Count;
I hope this helps you well.