'How to Assign value to List property

I Have on object class which inherits from another object class, now every properties value is retrieving from DBs but only one property value is remaining and that i want to get from another method's variable

Code1:

var billDetails = await _billDetailsApiService.GetAllByBillId(userData.Id, singleBillDetails.Content.Id);
accountBillVM.BillDetails = billDetails.Content.ToList();

Here GetAllByBillId has List

 Task<ApiResponse<List<BillHistoryDetails>>> GetAllByBillId(Guid id, long billId);

Object class

 public class BillHistoryDetails : BillDetail
{
    public string Name { get; set; }
    public string BillName { get; set; }

}

ViewModel class

    public List<BillHistoryDetails> BillDetails { get; set; }

How can I manualy store the value of BillName inside List

after getting value from

var getBillSessionType = await _billSessiontypeApiService.GetSingle(userData.Id, getBillSession.Content.BilllSessionTypeId, userData.AccountId);

so I could

BillName = getBillSessionType.Content.Name

but I am not getting value stored in BillName when I see the list content



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source