0

除了我的 Web 应用程序项目之外,我的解决方案中还有一个 BLL 和 DAL 项目。我正在使用实体框架 5,并且在 DAL 项目中有 .tt 文件。一切正常,但随后我尝试根据链接将 .tt 文件分离到一个新项目“实体”中。

实体和 DAL 项目构建良好。但是对于我的 BLL 中具有“使用 DAL”的所有类,我有一个新错误“找不到类型或命名空间 DAL”。我尝试清理所有解决方案并按顺序重建它们,我还尝试从 BLL 项目中删除 DAL 引用并读取它,但仍然是相同的错误。

什么可能导致这个问题?我还可以添加哪些信息来帮助找出问题所在?

在此处输入图像描述

编辑:

这是生成的 POCO 类的示例

//------------------------------------------------------------------------------
// <auto-generated>
//    This code was generated from a template.
//
//    Manual changes to this file may cause unexpected behavior in your application.
//    Manual changes to this file will be overwritten if the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace Entities
{
    using System;
    using System.Collections.Generic;

    public partial class tblsource_type
    {
        public tblsource_type()
        {
            this.tbltitles = new HashSet<tbltitle>();
        }

        public int Source_Type_Id { get; set; }
        public string Source_Type_Name { get; set; }

        public virtual ICollection<tbltitle> tbltitles { get; set; }
    }
}
4

1 回答 1

1

看起来您不再需要该using DAL;语句,因为该名称空间上不再有任何内容。只需删除它,应该没问题。

于 2015-11-16T14:38:47.573 回答