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


        }

  • 相关阅读:
    jQuery插件 -- Form表单插件jquery.form.js
    Ajax发送GET、POST请求和响应XML数据案例
    Ajax知识点复习
    Tomcat配置连接池的java实现
    dbcp数据库连接池的java实现
    C3P0数据库连接池的java实现
    推荐几款基于Bootstrap的响应式后台管理模板
    Java复习第四天
    Java复习第三天
    Java复习第二天
  • 原文地址:https://www.cnblogs.com/zq535228/p/1085497.html
Copyright © 2011-2022 走看看