Click here to Skip to main content
Click here to Skip to main content
Articles » Languages » C# » General » Downloads
 
Add your own
alternative version

MongoDB with C#.NET

, 30 Jan 2012 CPOL
This article demonstrates how to get started with MongoDB in C#.NET
MongoDB2.zip
MongoDB2
bin
Release
MongoDB2.exe
MongoDB2.vshost.exe
MongoDB2.vshost.exe.manifest
Model
MongoDB2.csproj.user
Properties
Settings.settings
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using MongoDB2.Model;

namespace MongoDB2
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }
        
        private void btnCreateData_Click(object sender, EventArgs e)
        {
            MyCompany.CreateData();
        }

        private void btnGetDepartments_Click(object sender, EventArgs e)
        {
            dataGridView1.DataSource = MyCompany.GetDepartments();
        }

        private void btnGetEmployees_Click(object sender, EventArgs e)
        {
            dataGridView1.DataSource = MyCompany.GetEmployees();
        }

        private void btnDeleteDepartments_Click(object sender, EventArgs e)
        {
            MyCompany.DeleteDepartments();
        }

        private void btnDeleteEmployees_Click(object sender, EventArgs e)
        {
            MyCompany.DeleteEmployees();
        }

    }
}

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)

Share

About the Author

m-idrees
Team Leader Innovative Solutions
Pakistan Pakistan
Software Engineer,
Karachi - Pakistan.
http://idreesdotnet.blogspot.com/
Follow on   Twitter

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.141223.1 | Last Updated 30 Jan 2012
Article Copyright 2012 by m-idrees
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid