I have this table in my database and I want to store incoming data:
public string Id { get; set; } = default!;
public double? Name { get; set; } = default!;
public string? FamilyName { get; set; } = default!;
public List<Addresses> ClientAddress { get; set; } = default!;
Here is my Addresses
class:
public string Id { get; set; } = default!;
public string Address { get; set; } = default!;
Now I want to store in database - how should I do with the list?
public Task<bool> StoreModel(MainModel mainmodel)
{
var listtostore = new MainModelEnity()
{
Name = mainmodel.Name,
FamilyName = mainmodel.FamilyName,
ClientAddress = //how should I store here?
}
}