Easy access to data in Iboxdb using the C # indexer

Source: Internet
Author: User

Using SQL to access one data operation is

SELECT * FROM Table where id=1

Generally simplified by encapsulation to operations similar to the following

Db. Find ("Table", 1);

With the C # Indexer in Iboxdb, operations are simplified to

db["Table", 1];

A simple but complete example of developing Android apps using Xamarin combined with IBOXDB

var db = new db (1, System.Environment.GetFolderPath (         System.Environment.SpecialFolder.Personal));d B. GetConfig (). Ensuretable ("Table", new dictionary<string,object>{{"ID", 0}}); var auto = db. Open (); using (var box = auto. Cube ()) {for (int i = 0; i < i++) {box ["Table]]. Insert (new dictionary<string,object> {"ID", I}, {"Name", "name-" + I}}); Box.commit (). Assert ();} button. Click + = delegate {button. Text = auto ["Table", count++% 100]. ToString ();};

Run

Just a few lines of code combined with indexers, super easy to implement a mobile database application.

Easy access to data in Iboxdb using the C # indexer

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.