????6??????????????????????
????public ActionResult Index()
????{
????//1.??????????????
????var Ou_UserInfoBLL = DI.SpringHelper.GetObject<IOu_UserInfoBLL>("Ou_UserInfo");
????var userInfo= Ou_UserInfoBLL.Login(""?? "");
????//2.???????
????return View();
????}
?????????????????DI.SpringHelper.GetObject<IOu_UserInfoBLL>("Ou_UserInfo");????????????????????????????????????????????????????Щ??????????
????7??IBLL????????T4???IBLLSession.tt????????IDAL?е????IDALSession????????????????????
????<#@ template language="C#" debug="false" hostspecific="true"#>
????<#@ include file="EF.Utility.CS.ttinclude"#><#@ output extension=".cs"#>
????<#
????CodeGenerationTools code = new CodeGenerationTools(this);
????MetadataLoader loader = new MetadataLoader(this);
????CodeRegion region = new CodeRegion(this?? 1);
????MetadataTools ef = new MetadataTools(this);
????string inputFile = @"..MODELOA.edmx";
????EdmItemCollection ItemCollection = loader.CreateEdmItemCollection(inputFile);
????string namespaceName = code.VsNamespaceSuggestion();
????EntityFrameworkTemplateFileManager fileManager = EntityFrameworkTemplateFileManager.Create(this);
????#>
????using System;
????using System.Collections.Generic;
????using System.Linq;
????using System.Text;
????namespace IBLL
????{
????public partial interface IBLLSession
????{
????<#
????// Emit Entity Types
????foreach (EntityType entity in ItemCollection.GetItems<EntityType>().OrderBy(e => e.Name))
????{#>
????I<#=entity.Name#>BLL I<#=entity.Name#>BLL{get;set;}
????<#}#>
????}
????}
????8??BLL????????T4???BLLSession.tt????????DAL?е????DALSession????????????????????
????<#@ template language="C#" debug="false" hostspecific="true"#>
????<#@ include file="EF.Utility.CS.ttinclude"#><#@ output extension=".cs"#>
????<#
????CodeGenerationTools code = new CodeGenerationTools(this);
????MetadataLoader loader = new MetadataLoader(this);
????CodeRegion region = new CodeRegion(this?? 1);
????MetadataTools ef = new MetadataTools(this);
????string inputFile = @"..MODELOA.edmx";
????EdmItemCollection ItemCollection = loader.CreateEdmItemCollection(inputFile);
????string namespaceName = code.VsNamespaceSuggestion();
????EntityFrameworkTemplateFileManager fileManager = EntityFrameworkTemplateFileManager.Create(this);
????#>
????using System;
????using System.Collections.Generic;
????using System.Linq;
????using System.Text;
????using IBLL;
????namespace BLL
????{
????public partial class BLLSession:IBLLSession
????{
????<#
????int index=0;
????// Emit Entity Types
????foreach (EntityType entity in ItemCollection.GetItems<EntityType>().OrderBy(e => e.Name))
????{
????index++;
????#>
????#region <#=index #> ?????? I<#=entity.Name#>BLL
????I<#=entity.Name#>BLL i<#=entity.Name#>BLL;
????public I<#=entity.Name#>BLL I<#=entity.Name#>BLL{
????get
????{
????if(i<#=entity.Name#>BLL==null)
????i<#=entity.Name#>BLL=new <#=entity.Name#>BLL();
????return  i<#=entity.Name#>BLL;
????}
????set
????{
????i<#=entity.Name#>BLL=value;
????}
????}
????#endregion
????<#}#>
????}
????}
????9??UI?????棬?????????Web.Helper??????IBLL??DI?????????????OperateContext.cs
????using DI;
????using IBLL;
????namespace Web.Helper
????{
????public class OperateContext
????{
????public static IBLLSession _IBLLSession = SpringHelper.GetObject<IBLLSession>("BLLSession");
????}
????}
????10??????????????
????using IBLL;
????using Web.Helper;
????public ActionResult Index()
????{
????var userInfo = OperateContext._IBLLSession.IOu_UserInfoBLL.Login(""?? "");
????//2.???????
????return View();
????}
????????????????????????????