封装自己的通用CURD By EF using System; using System.Collections.Generic; using System.Data.Entity; using System.Data.Entity.Infrastructure; using System.Linq; using System.Linq.Expressions; using System.Text; using MODEL; namespace ZRFDEMO.DAL { public clas…
1 首先引入的上篇node 链接mysql 里面的js var connect = require('./nodemysql.js'); 2 定义常量 const customerSQL = { queryAll: function(dbname, callback, obj) { //obj查找的条件 若没有全部返回 var where = '' if (obj == undefined) { where = '' } else { var s = ' WHERE ' for (var i i…