Click here to Skip to main content
15,880,608 members
Articles / Database Development / NoSQL

Using MongoDB with the Official C# Driver

Rate me:
Please Sign up or sign in to vote.
4.87/5 (28 votes)
24 Oct 2011CPOL6 min read 152.1K   3.9K   55  
Introduces how to use MongoDB in your ASP.NET MVC project using the official C# driver.
@using IntroMongo.Models
@model User
@{
    ViewBag.Title = "New user";
}
@using (Html.BeginForm())
{
    <table>
        <tr>
            <td>
                First name
            </td>
            <td>
                @Html.TextBoxFor(Model => Model.FirstName)
            </td>
        </tr>
        <tr>
            <td>
                Last name
            </td>
            <td>
                @Html.TextBoxFor(Model => Model.LastName)
            </td>
        </tr>
        <tr>
            <td>
                Age
            </td>
            <td>
                @Html.TextBoxFor(Model => Model.Age)
            </td>
        </tr>
    </table>
    <input type="submit" value="Save" />
}

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
Software Developer
Turkey Turkey
I am interested in innovation and creativity in software development and passionate in learning new stuff.

Comments and Discussions