22 lines
578 B
C#
22 lines
578 B
C#
|
|
using FluentNHibernate.Mapping;
|
|
using Results.Entities;
|
|
|
|
|
|
namespace Results.Mappings
|
|
{
|
|
public class PurchaseWaterMeterDataMap : ClassMap<PurchaseWaterMeterData>
|
|
{
|
|
public PurchaseWaterMeterDataMap()
|
|
{
|
|
Table("purchase_watermeterdata");
|
|
Id(x => x.Id);
|
|
Map(x => x.SerialNo);
|
|
|
|
// Map the foreign key to PurchaseOrder correctly
|
|
References(x => x.PurchaseBoxId)
|
|
.Column("PurchaseBoxId") // Replace this with the correct column name
|
|
.Not.Nullable();
|
|
}
|
|
}
|
|
} |