/// <summary> /// Active Dependent type names of this object /// </summary> public List <string> DependentObjectNames() { var dependentObjects = new List <string>(); if (Classifications.Any()) { dependentObjects.Add(typeof(Classification).Name); } return(dependentObjects.Distinct().ToList()); }
public CarMap() { if (Classifications == null || !Classifications.Any()) { throw new Exception(typeof(CarMap).FullName + " Classifications prop Need to be initialized before use"); } Map(c => c.Name).Name(nameof(Car.Name)); Map(c => c.LicensePlate).Name(nameof(Car.LicensePlate)); Map(c => c.Classification).Name(nameof(Car.LicensePlate)); Map(c => c.PricePerDay).Name(nameof(Car.PricePerDay)); Map(c => c.PurchaseDate).Name(nameof(Car.PurchaseDate)); Map(c => c.NextDrainDate).Name(nameof(Car.NextDrainDate)); Map(c => c.Description).Name(nameof(Car.Description)); Map(c => c.Rents).Ignore(); Map(c => c.Id).Ignore(); Map(c => c.CarImage).Ignore(); Map(c => c.Classification).ConvertUsing(row => ReadNested(row.GetField(nameof(Car.Classification)))); }
public override string ToString() { StringBuilder sb = new StringBuilder(); _ = sb.Append("Short name:" + string.Join(",", _shortNameList) + ";"); _ = sb.Append("Identity:" + Identity + ";"); if (string.IsNullOrEmpty(GroupIdentity)) { _ = sb.Append("Group:<not set>;"); } else { _ = sb.Append("Group:" + GroupIdentity + ";"); } if (Precedence != 0) { _ = sb.Append("Precedence:" + Precedence + ";"); } if (!string.IsNullOrEmpty(Author)) { _ = sb.Append("Author:" + Author + ";"); } if (Classifications.Any()) { _ = sb.Append("Classifications:" + string.Join(",", _classifications) + ";"); } if (_parameters.Any()) { _ = sb.Append("Parameters:" + string.Join(",", _parameters) + ";"); } if (_baselineInfo.Any()) { _ = sb.Append("Baseline:" + string.Join(",", _baselineInfo) + ";"); } if (_tags.Any()) { _ = sb.Append("Tags:" + string.Join(",", _tags.Select(t => t.Key + "(" + t.Value + ")")) + ";"); } return(sb.ToString()); }
/// <summary> /// Does this object have any dependent objects? (If it does have dependent objects, these would need to be deleted before this object could be deleted.) /// </summary> /// <returns></returns> public bool HasDependentObjects() { return(Classifications.Any()); }