資源簡(jiǎn)介
一個(gè)不錯(cuò)采用Entity Framework 的三層架構(gòu)

代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.Linq;
using?System.Linq.expressions;
using?System.Text;
using?GYCC.Logging;
using?GYCC.SMSWCF.IDAL;
using?PagedList;
namespace?GYCC.SMSWCF.BLL
{
????public?class?baseBLL:MarshalByRefobject
????{
????????protected?IRepository?m_baseDAL?=?null;
????????public?baseBLL(string?name)
????????{
????????????m_baseDAL?=?DALFactory.DALAdapter.Createobject(name)?as?IRepository;
????????}
????????public?T?Update(T?entity)?where?T?:?class
????????{
????????????return?m_baseDAL.Update(entity);
????????}
????????public?List?Update(List?entitys)?where?T?:?class
????????{
????????????return?m_baseDAL.Update(entitys);
????????}
????????public?T?Insert(T?entity)?where?T?:?class
????????{
????????????return?m_baseDAL.Insert(entity);
????????}
????????public?void?Delete(T?entity)?where?T?:?class
????????{
????????????m_baseDAL.Delete(entity);
????????}
????????public?T?Find(params?object[]?keyValues)?where?T?:?class
????????{
????????????return?m_baseDAL.Find(keyValues);
????????}
????????public?List?FindAll(expression>?conditions?=?null)?where?T?:?class
????????{
????????????????return?m_baseDAL.FindAll(conditions);
????????}
????????public?IPagedList?FindAllByPage(expression>?conditions?expression>?orderBy?int?pageSize?int?pageIndex)?where?T?:?class
????????{
????????????return?m_baseDAL.FindAllByPage(conditions?orderBy?pageSize?pageIndex);
????????}
????????public?bool?IsExist(params?object[]?keyValues)?where?T:?class
????????{
???????????bool?isExist?=?false;
???????????T?t?=?m_baseDAL.Find(keyValues);
???????????if?(?t?!=?null?)
???????????{
???????????????isExist?=?true;
???????????}
???????????return?isExist;
????????}
????}
}
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件????????222??2014-02-16?12:10??IDAL\IEnterprise.cs
?????文件????????780??2014-02-25?18:16??IDAL\IRepository.cs
?????文件??????14336??2014-02-15?16:54??PagedList.dll
?????文件???????1897??2014-02-28?09:04??BLL\ba
?????文件???????2444??2014-03-03?09:52??BLL\BLLAdapter.cs
?????文件???????4106??2014-03-04?09:33??BLL\EnterpriseBLL.cs
?????文件???????3222??2014-03-03?09:52??DAL\DALAdapter.cs
?????文件???????2572??2014-02-25?18:16??DAL\DALba
?????文件???????1890??2014-03-03?09:52??DAL\DALContext.cs
?????文件????????255??2014-02-16?12:10??DAL\EnterpriseDAL.cs
?????目錄??????????0??2014-03-23?12:00??IDAL
?????目錄??????????0??2014-03-23?11:55??BLL
?????目錄??????????0??2014-03-23?11:59??DAL
-----------?---------??----------?-----??----
????????????????31724????????????????????13
評(píng)論
共有 條評(píng)論