zoukankan      html  css  js  c++  java
  • 服务层

    服务项目
    我的业务层代码,用查找替换的方式就能很轻松的完成对表的一般性操作.
        public  class ProductCateCateService
        
    {
            
    public static void Save(ProductCate d)
            
    {
                NBearData.DB().Save(d);
            }

            
    public static void Del(int id)
            
    {
                NBearData.DB().Delete
    <ProductCate>(id);
            }

            
    public static ProductCate GetOne(int id)
            
    {
                
    return NBearData.DB().Find<ProductCate>(id);
            }

            
    public static int GetCount()
            
    {
                
    return NBearData.DB().From<ProductCate>().ToArray<ProductCate>().Length;
            }


            
    public static ProductCate[] GetAll()
            
    {
                
    return NBearData.DB().From<ProductCate>().ToArray<ProductCate>();
            }

            
    public static ProductCate[] GetAll(int pz, int pn)
            
    {
                
    return NBearData.DB().From<ProductCate>().ToArray<ProductCate>(pz, (pn - 1* pz);
            }

            
    public static ProductCate[] GetAll(WhereClip w)
            
    {
                
    return NBearData.DB().From<ProductCate>().Where(w).ToArray<ProductCate>();
            }

            
    public static ProductCate[] GetAll(WhereClip w, int pz, int pn)
            
    {
                
    return NBearData.DB().From<ProductCate>().Where(w).ToArray<ProductCate>(pz, (pn - 1* pz);
            }


        }

  • 相关阅读:
    e3.tree参考手册
    fckeditor使用详解
    提示constructor无法location的原因
    无限联动下拉框使用步骤
    动态sql构建的过程
    xsqlbuilder使用说明
    处理date类型对象的方式
    wdatepicker使用指南
    How to reclaim space in InnoDB when innodb_file_per_table is ON
    Bash script: report largest InnoDB files
  • 原文地址:https://www.cnblogs.com/zq535228/p/1085497.html
Copyright © 2011-2022 走看看