1.NuGet
1.1介绍
Nuget是一个.NET平台下的开源的项目,它是Visual Studio的扩展。在使用Visual Studio开发基于.NET Framework的应用时,Nuget能把在项目中添加、移除和更新引用的工作变得更加快捷方便
1.2 使用
virtual studio中项目右键引用,管理NuGet程序包,搜索dapper安装
2 Dapper 一个orm框架
2.1 介绍
A high performance Micro-ORM supporting SQL Server, MySQL, Sqlite, SqlCE, Firebird etc…
2.2 使用
导入dapper
Imports Dapper
从sqlconnection对象中即可调用一些方法,例如Query() Execute()
等
不用拼接字符串,但是传参条件必须为对象,可以是匿名对象。CRUD代码如下:
Function InsertIntoStu(ByRef con) As Integer
Dim insertSql = "insert into students (name,chinese,math,english) values (@name,@chinese,@math