Skip to content

Commit a91af6f

Browse files
committed
rewrote the readme.
1 parent 779ee62 commit a91af6f

File tree

1 file changed

+77
-11
lines changed

1 file changed

+77
-11
lines changed

README.md

Lines changed: 77 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,92 @@
1-
## MongoDB C# Driver
1+
MongoDB C# Driver
2+
=================
23

3-
documentation: http://www.mongodb.org/display/DOCS/CSharp+Language+Center
4-
apidoc: http://api.mongodb.org/csharp/
4+
You can get the latest stable release from the [official Nuget.org feed](http://www.nuget.org/packages/mongocsharpdriver) or from our [github releases page](https://github.com/mongodb/mongo-csharp-driver/releases).
55

6-
source code: http://github.com/mongodb/mongo-csharp-driver
6+
If you'd like to work with the bleeding edge, you can use our [build feed](https://www.myget.org/gallery/mongocsharpdriverbuild). Packages on this feed are pre-release and, while they've passed all our tests, are not yet ready for production.
77

8-
mongodb home: http://www.mongodb.org/
8+
Build Status
9+
------------
910

10-
### Questions and Bug Reports
11+
[![Build Status](http://jenkins.bci.10gen.cc:8080/buildStatus/icon?job=mongo-csharp-driver-1.x)](http://jenkins.bci.10gen.cc:8080/job/mongo-csharp-driver-1.x/)
1112

12-
* mailing list: http://groups.google.com/group/mongodb-user
13-
* jira: http://jira.mongodb.org/
13+
Getting Started
14+
---------------
1415

15-
### Change Log
16+
### Untyped Documents
17+
```C#
18+
using MongoDB.Bson;
19+
using MongoDB.Driver;
20+
```
1621

17-
http://jira.mongodb.org/browse/CSHARP
22+
```C#
23+
var client = new MongoClient("mongodb://localhost:27017");
24+
var server = client.GetServer();
25+
var database = server.GetDatabase("foo");
26+
var collection = database.GetCollection("bar");
27+
28+
collection.Insert(new BsonDocument("Name", "Jack"));
29+
30+
foreach(var document in collection.FindAll())
31+
{
32+
Console.WriteLine(document["Name"]);
33+
}
34+
```
35+
36+
### Typed Documents
37+
38+
```C#
39+
using MongoDB.Bson;
40+
using MongoDB.Driver;
41+
```
42+
43+
```C#
44+
public class Person
45+
{
46+
public ObjectId Id { get; set; }
47+
public string Name { get; set; }
48+
}
49+
```
50+
51+
```C#
52+
var client = new MongoClient("mongodb://localhost:27017");
53+
var server = client.GetServer();
54+
var database = server.GetDatabase("foo");
55+
var collection = database.GetCollection<Person>("bar");
56+
57+
collection.Insert(new Person { Name = "Jack" });
58+
59+
foreach(var person in collection.FindAll())
60+
{
61+
Console.WriteLine(person.Name);
62+
}
63+
```
64+
65+
Documentation
66+
-------------
67+
* [MongoDB](http://www.mongodb.org/)
68+
* [Documentation](http://www.mongodb.org/display/DOCS/CSharp+Language+Center)
69+
* [Api Documentation](http://api.mongodb.org/csharp/)
70+
71+
Questions/Bug Reports
72+
---------------------
73+
* [Discussion Forum](http://groups.google.com/group/mongodb-user)
74+
* [Stack Overflow](http://stackoverflow.com/questions/tagged/mongodb)
75+
* [Jira](https://jira.mongodb.org/browse/CSHARP)
76+
* [Jabbr](https://jabbr.net/#/rooms/mongodb)
77+
78+
If you’ve identified a security vulnerability in a driver or any other MongoDB project, please report it according to the [instructions here](http://docs.mongodb.org/manual/tutorial/create-a-vulnerability-report).
79+
80+
Contributing
81+
------------
82+
83+
Please see our [guidelines](CONTRIBUTING.md) for contributing to the driver.
1884

1985
### Maintainers:
2086
* Robert Stam [email protected]
2187
* Craig Wilson [email protected]
2288

23-
### Contributors:
89+
### Contributors (in alphabetical order):
2490
* Bit Diffusion Limited [email protected]
2591
* Alex Brown https://github.com/alexjamesbrown
2692
* Justin Dearing [email protected]

0 commit comments

Comments
 (0)