zoukankan      html  css  js  c++  java
  • BLL设计

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;

    namespace LC.BLL
    {
    using Entity;
    using IDAL;
    public class VIPUsersBLL:IBLLBase<VIPUsers>
    {
    public static string typeName = "VIPUsersDAL";
    public static IVIPUsers iVIPUsers;
    public VIPUsersBLL():base(typeName)
    {
    iVIPUsers = (IVIPUsers)idal;
    }
    public int Add(VIPUsers t)
    {
    var result = iVIPUsers.Add(t);
    return result;
    }

    public int Delete(int Id)
    {
    var result = iVIPUsers.Delete(Id);
    return result;
    }

    public List<VIPUsers> Query()
    {
    var result = iVIPUsers.Query();
    return result;
    }

    public VIPUsers QueryById(int Id)
    {
    var result = iVIPUsers.QueryById(Id);
    return result;
    }

    public int Update(VIPUsers t)
    {
    var result = iVIPUsers.Update(t);
    return result;
    }
    }
    }

    ///反射

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;

    namespace LC.BLL
    {
    using IDAL;
    using Factory;
    public class IBLLBase<T> where T:class,new()
    {
    public static IDALBase<T> idal;
    public IBLLBase(string typeName)
    {
    idal = DataAccess<IDALBase<T>>.GetFactory(typeName);
    }
    }
    }

  • 相关阅读:
    yum提示Another app is currently holding the yum lock
    函数参数返回值作用域笔记
    递归内置函数笔记
    装饰器笔记
    函数笔记扩展
    集合笔记
    线程和进程
    函数笔记
    线程与进程的区别
    Ubuntu操作及各种命令笔记.txt
  • 原文地址:https://www.cnblogs.com/mamingyuan/p/10002865.html
Copyright © 2011-2022 走看看