public void SetData( decimal pricePurchase, decimal priceSale, DateTime?dateSale, string vehicleId, Vehicles.Entities.Vehicle vehicle = null ) { this.PricePurchase = pricePurchase; this.PriceSale = priceSale; this.DateSale = dateSale; this.VehicleId = vehicleId; this.Vehicle = vehicle; }
public Announcement( string id, decimal pricePurchase, decimal priceSale, DateTime?dateSale, string vehicleId, Vehicles.Entities.Vehicle vehicle = null ) : this() { this.Id = string.IsNullOrWhiteSpace(id) ? RandomId.NewId() : id; this.SetData( pricePurchase: pricePurchase, priceSale: priceSale, dateSale: dateSale, vehicleId: vehicleId, vehicle: vehicle ); }