FirmTracker-Server/nHibernate/Transactions/TransactionProductMapping.cs

20 lines
555 B
C#

using FluentNHibernate.Mapping;
namespace FirmTracker_Server.nHibernate.Transactions
{
public class TransactionProductMapping : ClassMap<TransactionProduct>
{
public TransactionProductMapping()
{
Table("TransactionProducts");
Id(x => x.Id).GeneratedBy.Identity();
Map(x => x.TransactionId).Column("TransactionId").Not.Nullable();
Map(x => x.ProductID).Column("ProductId").Not.Nullable();
Map(x => x.Quantity);
//Map(x => x.UnitPrice);
}
}
}