コード例 #1
0
        public static FilterDefinition <UserDocument> FilterMatch(UserDocument user)
        {
            var builder = Builders <UserDocument> .Filter;

            return(builder.And(
                       builder.Eq("username", user.Username),
                       builder.Eq("password", user.Password)
                       ));
        }
コード例 #2
0
 public void InsertOne(UserDocument document)
 {
     Collection.InsertOne(document);
 }