Options
ObjectMother
JSON Seed Data
Builder
Builder
var jmJobCostCode = new JMJobCostCode()
{
Id = jmJobCostCodeId,
Code = "code code 1",
JMJobId = jmJobId,
QuantityFromEntity = QuantityFromEntity.None,
UnitOfMeasure = "Each",
IsDeleted = false,
DeletedBy = null,
DeletedDate = null
};var costCodeBuilder = new CostCodeBuilder();
var jmJobCostCode = costCodeBuilder
.WithId(jmJobCostCodeId)
.WithJobId(jmJobId)
.Build();
Automatically creates:
Builder
var jmJobCostCode2 = new JMJobCostCode()
{
Id = jmJobCostCodeId2,
Code = "code code 2",
JMJobId = jmJobId,
QuantityFromEntity = QuantityFromEntity.Material,
QuantityFromId = jmJobMaterialId,
UnitOfMeasure = "TON",
IsDeleted = false,
DeletedBy = null,
DeletedDate = null
};var jmJobCostCode2 = costCodeBuilder
.WithId(jmJobCostCodeId2)
.WithJobId(jmJobId)
.WithQuantityFromDriver(QuantityFromEntity.Material, jmJobMaterialId)
.Build();