EF6.0+APS.NET MVC5.0項目初探二(類庫參考關聯性及說明)

來源:互聯網
上載者:User

標籤:blog   http   io   資料   2014   html   管理   new   

接著上一篇(EF6.0+APS.NET MVC5.0項目初探一(介面展示),說說我搭建項目的一點心得。

第一步:我喜歡先建一個空的解決方案,只是個人喜好,不喜勿噴,呵呵。

第二步:添加項目所需要的類庫:

 

第三步:添加類庫引用

UI.Manage->BusinessLogic.BLL,Domain.Entity,Domain.ViewModel,Infrastructure.Common,UI.HtmlHelper

BusinessLogic.BLL->Domain.Entity,Infrastructure.Ioc,DataAccess.DAL

DataAccess.DAL->Domain.Entity,Domain.DbContext,系統程式集(System.Data.Entity,EntityFramework)

Domain.DbContext->Domain.Entity,System.ComponentModel.DataAnnotations

Infrastructure.Ioc->DataAccess.DAL

 

程式集說明:

UI.Manage 是後台管理的ASP.NET MVC5.0的網站項目。

UI.HtmlHelper 是一些擴充的htmlHelper。

BusinessLogic.BLL 是商務邏輯,UI.Manage 直接從這裡取資料。

DataAccess.DAL 是資料層。

DataAccess.IDAL 是資料介面層,暫時沒用上(現在還沒有面向介面)。

Domain.DbContext 是資料庫介面,裡面放著EF(code first 方式)訪問的網關。

Domain.Entity 實體驗證模型。

Domain.ViewModel 領域模型,用來對實體驗證模型進行轉換。

Infrastructure.Ioc IOC容器,DataAccess.DAL在這裡執行個體化,現在是直接new的DAL,以後會用Ninject注入。

Infrastructure.Common 公用輔助類庫。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.