NoRM UpdateOne no work

222 views Asked by At

I'm using NoRM + MongoDB in an application test. I found the source code of the Mongo Session http://normproject.org/samples where the method update wrapp this:

using(var db = Mongo.Create(_connectionString))
{
  db.GetCollection<T>().UpdateOne(item, item);
}

But when I send object to update using this method my object no save, but what if I call Save instead of UpdateOne my object is save.

My objects: https://gist.github.com/1616565

What's wrong?

2

There are 2 answers

0
Anup Marwadi On BEST ANSWER
0
Robert Stam On

I would recommend using the official C# driver, which you can find at:

http://www.mongodb.org/display/DOCS/CSharp+Language+Center