Framework版本:.Net Framework 4 ConnectionUtil源码参见:https://www.cnblogs.com/threadj/p/10536273.html using System; using System.Collections.Generic; using System.Linq; using System.Web; using MongoDB.Driver; using MongoDB.Bson; using MongoDB.Driver.Builde
约束 public abstract class BaseModel { public int Id { get; set; } } 连接字符串 public static readonly string Customers = ConfigurationManager.ConnectionStrings["Customers"].ToString(); 通用数据库字符串 public class SqlBuilder<T> where T : BaseModel { pu
using System; using System.Collections.Generic; using System.Data.SqlClient;//引用数据库客户端 using System.Linq; using System.Text; using System.Threading.Tasks; using System.Reflection; using System.Data; namespace PubilcHelper { public class DBHelper { //