Click here to Skip to main content
15,881,248 members
Articles / Database Development / NoSQL

MongoDB and C#

Rate me:
Please Sign up or sign in to vote.
4.90/5 (66 votes)
15 Jun 2010CPOL7 min read 431.1K   11.1K   178  
Using MongoDB from C#.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using MongoDB;

namespace MongoDBBlog.Tester
{
    public class Post 
    {
        public Oid Id { get; private set; }
        
        public string Title { get; set; }
        
        public string Body { get; set; }

        public int CharCount { get; set; }
        
        public IList<Comment> Comments { get; set; }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
United States United States
I work at a financial services firm using mostly .NET. I enjoy my job immensely and love teaching, training, and mentoring younger developers.

Comments and Discussions