Beispiel #1
0
        public CsSystemUsers GetModel(int primaryKey)
        {
            var strSql = "SELECT * FROM CrabShop.dbo.[CsSystemUsers] WHERE SysUserId = @primaryKey";

            return(DbClient.Query <CsSystemUsers>(strSql, new { primaryKey }).FirstOrDefault());
        }
Beispiel #2
0
        public List <CsSystemUsers> GetModelList(string where)
        {
            var strSql = $"SELECT * FROM CrabShop.dbo.[CsSystemUsers] WHERE 1 = 1 {where}";

            return(DbClient.Query <CsSystemUsers>(strSql).ToList());
        }
Beispiel #3
0
        public bool Delete(int primaryKey)
        {
            var strSql = "DELETE FROM CrabShop.dbo.[CsSystemUsers] WHERE SysUserId = @primaryKey";

            return(DbClient.Excute(strSql, new { primaryKey }) > 0);
        }
Beispiel #4
0
 public int DeleteByWhere(string where)
 => DbClient.Excute($"DELETE FROM CrabShop.dbo.[CsSystemUsers] WHERE 1 = 1 {where}");
Beispiel #5
0
        public CsPrice GetModel(int primaryKey)
        {
            var strSql = "SELECT * FROM CrabShop.dbo.[CsPrice] WHERE PriceId = @primaryKey";

            return(DbClient.Query <CsPrice>(strSql, new { primaryKey }).FirstOrDefault());
        }
Beispiel #6
0
 public bool ExistsByWhere(string where)
 => DbClient.ExecuteScalar <int>($"SELECT COUNT(1) FROM CrabShop.dbo.[CsSystemUsers] WHERE 1 = 1 {where};") > 0;
Beispiel #7
0
        public CsUsers GetModelByTelPhone(string telPhone)
        {
            var strSql = $"select top 1 * from CsUsers where UserPhone='{telPhone}' ";

            return(DbClient.Query <CsUsers>(strSql).FirstOrDefault());
        }
Beispiel #8
0
        public bool Delete(int primaryKey)
        {
            var strSql = "DELETE FROM CrabShop.dbo.[CsPrice] WHERE PriceId = @primaryKey";

            return(DbClient.Excute(strSql, new { primaryKey }) > 0);
        }
Beispiel #9
0
        public CsUsers GetModel(string openId)
        {
            var strSql = "SELECT * FROM CrabShop.dbo.[CsUsers] WHERE OpenId = @openId";

            return(DbClient.Query <CsUsers>(strSql, new { openId }).FirstOrDefault());
        }
Beispiel #10
0
        public List <CsOrderDetail> GetModelList(string where)
        {
            var strSql = $"SELECT * FROM CrabShop.dbo.[CsOrderDetail] WHERE 1 = 1 {where}";

            return(DbClient.Query <CsOrderDetail>(strSql).ToList());
        }
Beispiel #11
0
        public CsOrderDetail GetModel(int primaryKey)
        {
            var strSql = "SELECT * FROM CrabShop.dbo.[CsOrderDetail] WHERE DetailId = @primaryKey";

            return(DbClient.Query <CsOrderDetail>(strSql, new { primaryKey }).FirstOrDefault());
        }
Beispiel #12
0
 public int DeleteByWhere(string where)
 => DbClient.Excute($"DELETE FROM CrabShop.dbo.[CsOrderDetail] WHERE 1 = 1 {where}");
Beispiel #13
0
 public int DeleteByWhere(string where)
 => DbClient.Excute($"DELETE FROM CrabShop.dbo.[CsCsDistrict] WHERE 1 = 1 {where}");