我FormTemplate
的项目中有实体,并且我有Questionnaire
包含 FormTemplate 的实体
using System;
using System.Collections.Generic;
using Argussoft.BI.DAL.Domain.Questionnaires;
using Argussoft.BI.DAL.Domain.FormTemplates;
namespace Argussoft.BI.DAL.Domain.Questionnaires
{
public class Questionnaire : BaseEntity
{
public virtual string Name { get; set; }
public virtual FormTemplate FormTemplate { get; set; }
public virtual DateTime? DateCreation { get; set; }
public virtual QuestionnaireStatus Status { get; set; }
public virtual int Respondent { get; set; }
}
public class QuestionnaireMap : BaseEntityMap<Questionnaire>
{
public QuestionnaireMap()
{
Map(x => x.Name).Unique();
Map(x => x.FormTemplate);
Map(x => x.DateCreation);
References(x => x.Status).Column("Status");
Map(x => x.Respondent);
}
}
}
我应该如何做映射FormTemplate
?