-
Notifications
You must be signed in to change notification settings - Fork 64
Open
Description
I have to generate a fixed-length text file. How can I map a list of object in my main model? Let's assume that I have the following models:
public class Employee
{
public string LastName { get; set; } = string.Empty;
public string FirstName { get; set; } = string.Empty;
public string Title { get; set; } = string.Empty;
public Address EmployeeAddress { get; set; }
public List<Child>? Children { get; set;}
}
public class Child
{
public string? ChildName { get; set; }
public int Age { get; set; }
public string Sex { get; set; } = "M";
}
- How can I map the List Children using FixedLengthTypeMapper ?
- I have a list of employee to write in the text file and while looping through every employee, if an employee has children, I need to loop through all the children and write them before moving to the next employee. In this kind of scenario, what can be the efficient way to do the writing.
Thanks
Metadata
Metadata
Assignees
Labels
No labels