using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace UseRestService.Data { [Serializable] public class Part { public string PartID { get; set; } public string PartName { get; set; } public string TheSuppliers { get; set; } public string PartType { get; set; } public List Suppliers { get; set; } = new List(); public DateTime PartAvailableDate { get; set; } public string SupplierString { get { string result = String.Empty; foreach (string supplier in Suppliers) { result += $"{supplier}, "; } result = result.Trim(',', ' '); return result; } } } }