Exemplo n.º 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());
        }
Exemplo n.º 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());
        }
Exemplo n.º 3
0
        public bool Delete(int primaryKey)
        {
            var strSql = "DELETE FROM CrabShop.dbo.[CsSystemUsers] WHERE SysUserId = @primaryKey";

            return(DbClient.Excute(strSql, new { primaryKey }) > 0);
        }
Exemplo n.º 4
0
 public int DeleteByWhere(string where)
 => DbClient.Excute($"DELETE FROM CrabShop.dbo.[CsSystemUsers] WHERE 1 = 1 {where}");
Exemplo n.º 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());
        }
Exemplo n.º 6
0
 public bool ExistsByWhere(string where)
 => DbClient.ExecuteScalar <int>($"SELECT COUNT(1) FROM CrabShop.dbo.[CsSystemUsers] WHERE 1 = 1 {where};") > 0;
Exemplo n.º 7
0
        public CsUsers GetModelByTelPhone(string telPhone)
        {
            var strSql = $"select top 1 * from CsUsers where UserPhone='{telPhone}' ";

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

            return(DbClient.Excute(strSql, new { primaryKey }) > 0);
        }
Exemplo n.º 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());
        }
Exemplo n.º 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());
        }
Exemplo n.º 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());
        }
Exemplo n.º 12
0
 public int DeleteByWhere(string where)
 => DbClient.Excute($"DELETE FROM CrabShop.dbo.[CsOrderDetail] WHERE 1 = 1 {where}");
Exemplo n.º 13
0
 public int DeleteByWhere(string where)
 => DbClient.Excute($"DELETE FROM CrabShop.dbo.[CsCsDistrict] WHERE 1 = 1 {where}");