"Goal": This article will show you how to access MongoDB in C #, complete common database operations tasks, and also introduce MONGODB clients (command-line working mode) and some basic commands in the form of real combat."description": What is
MongoDB combat Development "0 basic Learning, with complete ASP.Read Catalogue
Begin
Download MongoDB, and start it
Using MongoDB in C #
Refactoring (simplifying) code
Viewing data using MongoDB's clients
Maintaining
2, install (Windows only)Download the corresponding package to the official websiteExtract to D:mongodbCreate d:mongodbdata Drop Data file
3, Run MongoDBD:mongodbbin There are executable files, where Mongod.exe is the server side, Mongo.exe is the
Link Database
Use the following code to create a database link $connection = new Mongo (); Link to localhost:27017
$connection = new Mongo ("example.com"); Link to remote host (default port)
$connection = new Mongo ("example.com:65432"); Custom
Basic Tutorial: 1. Connect to the mongo database server. Syntax example :? Php $ connectionnewclientclient (); connect to the local database. The default port is 27017. That is, localhost: 27017 $ connectionnewclientclient (mongodb: example.com);
MongoDB and PHP Add, modify, query, deletePHP extension mongon.mod.dll Download http://cn.php.net/manual/en/mongo.installation.php#mongo.installation.windowsThen php.ini add Extension=php_mongo.dllFinally Phpinfo () foundTable tag PHP has its own
PHP extension mongon.mod.dll Download http://cn.php.net/manual/en/mongo.installation.php#mongo.installation.windowsThen php.ini add Extension=php_mongo.dllFinally Phpinfo () foundTable tag PHP has its own MONGO feature, you can manipulate the
PHP extension mongon.mod.dll Download http://cn.php.net/manual/en/mongo.installation.php#mongo.installation.windowsThen php.ini add Extension=php_mongo.dllFinally Phpinfo () find
The table label PHP has its own MONGO function, you can operate the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.