2
내가 주목 한 것은 Ncv에서 참조하는 보고서 필드가 생성되지 않았다는 것입니다. 다음은 내가받는 오류입니다.Count = 1 인이 SqlParameterCollection에 대한 잘못된 인덱스 1
내 도메인은 다음과 같습니다.받는 오류는 Count = 1 인이 SqlParameterCollection에 대한 잘못된 인덱스 1입니다.
public class NcvMap : SubclassMap<Ncv>
{
public NcvMap()
{
HasManyToMany<Document>(x => x.Technician)
.Cascade.All();
HasManyToMany<Document>(x => x.Neurologist)
.Cascade.All();
HasManyToMany<Document>(x => x.Transcriber)
.Cascade.All();
References<Document>(x => x.Report).Nullable();
}
}
public class Ncv : Report
{
public virtual IList<Document> Technician { get; private set; }
public virtual IList<Document> Neurologist { get; private set; }
public virtual IList<Document> Transcriber { get; private set; }
public virtual Document Report { get; set; }
public virtual NcvType Type { get; set; }
public Ncv()
{
this.Technician = new List<Document>();
this.Neurologist = new List<Document>();
this.Transcriber = new List<Document>();
}
}
public class Report : BaseModel
{
public virtual Patient Patient { get; set; }
public virtual ReportStatus Status { get; set; }
public virtual DateTime Appointment { get; set; }
public virtual long Kareo_id { get; set; }
public virtual IList<ReportLog> Logs { get; private set; }
public Report()
{
this.Status = ReportStatus.New;
this.Logs = new List<ReportLog>();
}
public virtual void AddLog(ReportLog log)
{
log.Report = this;
this.Logs.Add(log);
}
}
public class ReportMap : ClassMap<Report>
{
public ReportMap()
{
Id(x => x.Id);
Map(x => x.CreateDate);
Map(x => x.LastModified);
Map(x => x.Appointment);
Map(x => x.Status).CustomType<int>();
Map(x => x.Kareo_id);
HasMany<ReportLog>(x => x.Logs)
.Cascade.All();
References<Patient>(x => x.Patient);
}
}
C# 배열이 0으로 시작하기 때문에 인덱스 0을 읽어야합니다. – DeveloperX
인덱스 0? 나는 색인 1조차 확실하지 않다. –
이 현상금을받을 수 있습니까? –