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);
            }


        }

  • 相关阅读:
    win8应用商店安装路径
    GridView用存储过程实现分页
    Struts学习笔记之HTML标签库
    一个大学毕业生的反思
    JUnit in Action关于Controller的简明阐述
    Struts学习笔记之BEAN标签库
    Struts中web.xml和strutsconfig.xml配置详解
    Os学习笔记之处理机调度
    log4j.properties配置详解
    JUnit学习笔记之简介
  • 原文地址:https://www.cnblogs.com/zq535228/p/1085497.html
Copyright © 2011-2022 走看看