Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I'd like to know the best approach to do a count over a list that is part of a collection, for simplicity I've abstracted to the following model:

public class User
    {
        [BsonId]
        public ObjectId Id { get; set; }
        public string FirstName { get; set; }
        public string LastName { get; set; }
        public List<ObjectId> Followers { get; set; }
        public List<ObjectId> Following { get; set; }  

    }

Just assume that probably the average of followers/ following could be around 2k on each property, I know some people like to pre-calculate the information using inc, is that recommend under the circumstances described above? if that's the case which could be the approach using the C# driver?

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.