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) )); }
public void InsertOne(UserDocument document) { Collection.InsertOne(document); }