public PlanItem(IItem item) : base(item) { // EF ComplexType objects cannot be null if (Unit == null) { Unit = new Unit(); } if (DeliveryDate == null) { DeliveryDate = new Period(); } if (DeliveryAddress == null) { DeliveryAddress = new AddressOptional(); } if (DeliveryLocation == null) { DeliveryLocation = new DeliveryLocation(); } if (Classification == null) { Classification = new ClassificationCPVOptional(); } }
public DraftPlan(IDraftPlan plan) : base(plan) { // EF ComplexType objects cannot be null // MinimalStep is required but sometimes prozoro returns null if (Classification == null) { Classification = new ClassificationCPVOptional(); } if (Budget == null) { Budget = new Budget(); } if (Budget.Project == null) { Budget.Project = new Project(); } if (Tender == null) { Tender = new PlanTender(); } if (Tender.TenderPeriod == null) { Tender.TenderPeriod = new Period(); } }