示例#1
0
 public ActionResult Index()
 {
     return(View("index", dbUtility.Entities <Task>("SELECT ID, Title, Completed FROM Tasks")));
 }
示例#2
0
文件: Program.cs 项目: h2h/DbUtility
        static void Main( string[] args )
        {
            var dbUtility = new SqlDbUtility( "Data Source=113.98.255.70,130;Initial Catalog=TEST_FOCALPRICE_DB;Persist Security Info=True;User ID=focal_db;Password=focal_db?;Pooling=True" );

              var result = dbUtility.Entities<P>( "SELECT ProductName, UnitPrice FROM Products WHERE SKU LIKE 'EP%'" );
        }