Tianvdata is released free of charge and available for download

Source: Internet
Author: User

Preface:

Since accessing ASP. NET, database operations have become a common part of all website projects,

I have gone through many ways and made many detours.Code(Especially like subsonic), you should release your own,

For your reference.

 

Introduction:

Tianvdata is one of the main components of our company's upcoming tianvcms.

It is a small, simple, and fast database component. By using the native dbproviderfactory, it makes cross-database quite convenient.

Usage:

The download package contains the specific content of the usage method. Here we will simply paste some code:

View code

Private VoidTestormwithoutdb (){VaRP1 =NewNews_info () {Title ="First Title"}; P1.insert ();IntLastid =P1.id;VaRP2 =News_info.select (lastid); p2.title="Second Title"; P2.update (); p2.delete ();}
View code

    Private   Void  Test10000text (){  Using (DB = New DB ( "  Tianv  "  )){  VaR P1 = dB. executenonquery ( "  Insert into news_info (title) values ('first title ')  "  );  Int Lastid = dB. executescalar < Int > ( "  Select max (ID) from news_info  "  );  VaR P2 = dB. executenonquery ( "  Update news_info set Title = 'second title' where id =  " + Lastid );  VaR P3 = dB. executescalar ( "  Select title from news_info where id = " + Lastid );  Using ( VaR Reader = dB. executereader ( "  Select * From news_info where ID> = 1 limit 10 offset 0  "  )){}  VaR P4 = dB. executetable ( "  Select * From news_info where ID> = 1 limit 10 offset 0  "  ); VaR P5 = dB. executescalar < String > ( "  Select title from news_info where id =  " + Lastid );  VaR P6 = dB. executesingle <news_info> ( "  Select * From news_info where id =  " + Lastid );  VaR P7 = dB. executelist <news_info> ( " Select * From news_info where ID> = 1 limit 10 offset 0  "  );  VaR P8 = dB. executenonquery ( "  Delete from news_info where id =  " + Lastid );}} 
View code

     Private   Void  Test10000texthelperwithoutdb (){  VaR Lastid = SQL <news_info>. Insert (). Set (T => T. title, "  First Title  "  ). Executescalar < Int > ();  VaR P2 = SQL <news_info> . Update (). Set (T => T. title, "  Second Title  "  ). Where (T => T. ID,"  =  "  , Lastid). executenonquery ();  VaR P3 = SQL <news_info> . Select (). Columns (T => T. Title). Where (T => T. ID, "  =  "  , Lastid). executescalar ();  VaR P4 = SQL <news_info>. Select (). Where (T => T. ID, "  > =  " , 1  ). Limit (  10 ). Skip ( 0  ). Executetable ();  VaR P5 = SQL <news_info> . Select (). Columns (T => T. Title). Where (T => T. ID,"  =  "  , Lastid). executescalar < String > ();  VaR P6 = SQL <news_info> . Select (). Where (T => T. ID, "  =  "  , Lastid). Limit (  10 ). Skip ( 0 ). Executesingle ();  VaR P7 = SQL <news_info> . Select (). Where (T => T. ID, "  > =  " , 1  ). Limit (  10 ). Skip ( 0  ). Executelist ();  VaR P8 = SQL <news_info>. Delete (). Where (T => T. ID, "  =  "  , Lastid). executenonquery ();} 

 

Open Source:

Tianvdata adopts the gplv2 open source protocol.

 

Download:

Open Source: https://tianvdata.codeplex.com/

: Http://tianvdata.codeplex.com/releases/

Simple document: http://tianvdata.codeplex.com/documentation

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.