0

I am a bit new to using several Classes in a single project. I have a project which include 3 projects. first is my mvc layout 2nd is BL and 3rd is DL. mvc has a reference to bl and bl to dl. Now the problem is here , how can I access from mvc to dl objects? am I should using Interfaces? I have an enum in dl which is like that:

namespace AccounterDL
{


    public enum Sort
    {
        None = 0,
        Descending,
        Assending


    }



}   

Now I can't access to this from mvc contorller:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using AccounterBL;
using PagedList;
//using AccounterDL;  I don't want get it directly








namespace AccounerTransactions.Controllers
{
//sort s ...
}  

I want skip Data Access from mvc and get object from bl while its in dl...

4

1 回答 1

-1

您应该将 DL 引用添加到 mvc 项目,然后采用 DL 命名空间

构建 dl 程序集然后添加到 mvc 项目

于 2019-04-10T06:00:57.423 回答