Asp.net mvc Upida.net在尝试筛选具有嵌套类的类时出错
我正在使用Upida从业务模型生成DTO。我还使用Castle active作为构建在nHibernate之上的ORM 以下是我尝试根据Upida Dto级别筛选的类:Asp.net mvc Upida.net在尝试筛选具有嵌套类的类时出错,asp.net-mvc,nhibernate,dto,castle-activerecord,Asp.net Mvc,Nhibernate,Dto,Castle Activerecord,我正在使用Upida从业务模型生成DTO。我还使用Castle active作为构建在nHibernate之上的ORM 以下是我尝试根据Upida Dto级别筛选的类: namespace Web.Models { [ActiveRecord(Table = TableNames.USER)] public class User : DBEntity<User> { public User() { MappedUsersand
namespace Web.Models
{
[ActiveRecord(Table = TableNames.USER)]
public class User : DBEntity<User>
{
public User()
{
MappedUsersandDepartments = new List<UserDepartmentRoleMap>();
}
[Dto(DTOLevel.DTO)]
[Property(Length = 255)]
public string FirstName { get; set; }
[Dto(DTOLevel.DTO)]
[Property(Length = 255)]
public string LastName { get; set; }
[Dto(DTOLevel.NOTEXPOSED)]
[Nested]
public Contact Contact { get; set; }
}
}
此联系人类未映射到数据库中的其他表。它在同一个用户表中。
我得到的错误是
Unable to find parser for property: contact, of type: Web.Models.Nested.Contact.
You must setup custom parser for this property in the Dto attribute.
谁能帮我指出我错了什么,或者我应该如何处理它??
提前感谢。您使用什么版本的upida? 这可能是因为Contact类不是从Upida.Dtobase继承的
Unable to find parser for property: contact, of type: Web.Models.Nested.Contact.
You must setup custom parser for this property in the Dto attribute.