Ben H
Ben H

Reputation: 3236

'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 :-)

Upvotes: 0

Views: 719

Answers (1)

user333306
user333306

Reputation:

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

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

Upvotes: 3

Related Questions