Working with MongoDB Conventions

Posted by: K. Scott Allen, on 08 Mar 2012 | View original | Bookmarked: 0 time(s)

I started working with Mongo again recently and needed to fiddle a bit to retrieve existing data using the official 10gen driver. Let's say you have the following persisted in a Mongo collection: { "_id": ObjectId("4efa88..."), "first_name": "Scott" }; The driver will happily work with an object of the following type using the default mapping conventions. public class Person { public ObjectId _id { get; set; } public string first_name { get; set; } } Of course, the C# class...

Category: C# | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 642 | Hits: 28

Similar Posts

  • Experimenting with MongoDB from C# more
  • A Friendly Reminder to Quit Using Method Parameters As Local Variables more
  • Batch files to check SQL 2005 (MDF) files in and out of Subversion source control more
  • [tip] Use WinMerge for compare / merge in SourceGear Vault more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD