简体   繁体   中英

'NHibernate.Mapping.Property' is not an attribute class

This code fails to compile with the error 'NHibernate.Mapping.Property' is not an attribute class . Any ideas why?

using System;
using System.Linq;
using DevExpress.Xpo;
using System.Collections.Generic;
using System.Text;
using NHibernate.Mapping;

namespace Test {

  public class User : IdentityItem {

    public string email;
    public string password;
    public string displayname;

    [NHibernate.Mapping.Property(IsLazy = true, IsOptional = true, Name = "admin_notes")]
    public string admin_notes { get; set; }

  }
}

Thanks in advance :-)

It's because 'NHibernate.Mapping.Property' is not an attribute class.

Use 'NHibernate.Mapping.Attributes.Property' instead.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM