public T Get(long Id) { T model = null; if (Id > 0 && _DBContext != null) { model = _DBContext.GetSimpleClient().GetById <T>(Id); } return(model); }
public MySqlSugarClient() { var connectionConfig = new ConnectionConfig { ConnectionString = "server=.;uid=sa;pwd=Admin,123;database=RayPI", DbType = DbType.SqlServer, IsAutoCloseConnection = true }; Client = new SqlSugarClient(connectionConfig); SimpleClient = Client.GetSimpleClient(); }
public BaseService() { db = GetClient(); this.sdb = db.GetSimpleClient(); }
public BaseService() { db = SqlSugarHelper.GetClient(); sdb = db.GetSimpleClient(); }