Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/31.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Nhibernate无法编译映射文件_C#_Asp.net_Nhibernate - Fatal编程技术网

C# Nhibernate无法编译映射文件

C# Nhibernate无法编译映射文件,c#,asp.net,nhibernate,C#,Asp.net,Nhibernate,我的Customer.cfg.xml文件是: <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" auto-import="true" assembly="OnlineShop" namespace="OnlineSho

我的Customer.cfg.xml文件是:

<?xml version="1.0" encoding="utf-8" ?>
 <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" auto-import="true" 
  assembly="OnlineShop" 
   namespace="OnlineShop">
   <class name="Customer" table="Customer" dynamic-update="true" >
    <cache usage="read-write"/>
    <id name="CustomerID" column="CustomerID" type="long">
        <generator class="native" />
    </id>

    <property name="Name"  />
    <property name="Fname" />
    <property name="Phone" />
</class>
</hibernate-mapping>
但是我得到一个错误,说不能编译Customer.cfg.Xml文件

这是我的解决方案屏幕截图

我认为这是因为文件末尾缺少关闭选项卡

 public class Customer
{
    public virtual long CustomerID { get; set; }
    public virtual string Name { get; set; }
    public virtual string Fname { get; set; }
    public virtual string Phone { get; set; }
}