• 大小: 144KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-19
  • 语言: 其他
  • 标签: EF  linq  三层  

资源简介

Entity Framework的简单应用实例。三层架构

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EF.DAL;
using EF.Model;

namespace EF.BLL
{
    public class BlogArticleService
    {
        IRepository repository;
        public BlogArticleService(IRepository repository)
        {
            this.repository = repository;
        }

        public BlogArticleService()
        {
            this.repository = new BlogArticleRepository();
        }

        public BlogArticle Create()
        {
            return repository.Create();
        }

        public BlogArticle Insert(BlogArticle entity)
        {
            return repository.Insert(entity);
        }

        public BlogArticle Update(BlogArticle entity)
        {
            return repository.Update(entity);
        }

        public void Delete(BlogArticle entity)
        {
            repository.Delete(entity);
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       5120  2011-07-07 00:39  EF_Demo\EF.BLL\bin\Debug\EF.BLL.dll

     文件      15872  2011-07-07 00:39  EF_Demo\EF.BLL\bin\Debug\EF.BLL.pdb

     文件       7168  2011-07-07 00:39  EF_Demo\EF.BLL\bin\Debug\EF.DAL.dll

     文件      15872  2011-07-07 00:39  EF_Demo\EF.BLL\bin\Debug\EF.DAL.pdb

     文件      38912  2011-07-07 00:39  EF_Demo\EF.BLL\bin\Debug\EF.Model.dll

     文件      13824  2011-07-07 00:39  EF_Demo\EF.BLL\bin\Debug\EF.Model.pdb

     文件        972  2011-07-07 00:27  EF_Demo\EF.BLL\BlogArticleService.cs

     文件       1408  2011-07-07 00:44  EF_Demo\EF.BLL\BlogCategoryService.cs

     文件       2797  2011-07-07 00:28  EF_Demo\EF.BLL\EF.BLL.csproj

     文件          0  2011-07-07 01:17  EF_Demo\EF.BLL\obj\Debug\build.force

     文件       5952  2011-07-07 01:17  EF_Demo\EF.BLL\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件        834  2011-07-07 00:28  EF_Demo\EF.BLL\obj\Debug\EF.BLL.csproj.FileListAbsolute.txt

     文件       5120  2011-07-07 00:39  EF_Demo\EF.BLL\obj\Debug\EF.BLL.dll

     文件      15872  2011-07-07 00:39  EF_Demo\EF.BLL\obj\Debug\EF.BLL.pdb

     文件      13936  2011-07-07 00:39  EF_Demo\EF.BLL\obj\Debug\ResolveAssemblyReference.cache

     文件       1344  2011-07-06 23:00  EF_Demo\EF.BLL\Properties\AssemblyInfo.cs

     文件       7168  2011-07-07 00:39  EF_Demo\EF.DAL\bin\Debug\EF.DAL.dll

     文件      15872  2011-07-07 00:39  EF_Demo\EF.DAL\bin\Debug\EF.DAL.pdb

     文件      38912  2011-07-07 00:39  EF_Demo\EF.DAL\bin\Debug\EF.Model.dll

     文件      13824  2011-07-07 00:39  EF_Demo\EF.DAL\bin\Debug\EF.Model.pdb

     文件        250  2011-07-07 01:03  EF_Demo\EF.DAL\BlogArticleRepository.cs

     文件        245  2011-07-07 00:06  EF_Demo\EF.DAL\BlogCategoryRepository.cs

     文件       1445  2011-07-07 01:10  EF_Demo\EF.DAL\DemoDB.Context.cs

     文件       6323  2011-07-06 22:45  EF_Demo\EF.DAL\DemoDB.Context.tt

     文件       3543  2011-07-07 00:09  EF_Demo\EF.DAL\EF.DAL.csproj

     文件        220  2011-07-07 00:07  EF_Demo\EF.DAL\IBlogArticleRepository.cs

     文件        222  2011-07-07 00:05  EF_Demo\EF.DAL\IBlogCategoryRepository.cs

     文件        376  2011-07-07 00:01  EF_Demo\EF.DAL\IRepository.cs

     文件          0  2011-07-07 01:17  EF_Demo\EF.DAL\obj\Debug\build.force

     文件       6256  2011-07-07 01:17  EF_Demo\EF.DAL\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

............此处省略96个文件信息

评论

共有 条评论