// Mappers // Note: doesn't expose behavior public static FamilyMemberResponse FromFamilyMember(FamilyMemberDTO item) => new FamilyMemberResponse() { Id = item.Id, LastName = item.LastName, Name = item.Name, Pets = item.Pets == null ? new List <PetResponse>() : PetResponse.FromPetDTO(item.Pets) };
// Mappers // Note: doesn't expose behavior public static EmployeeResponse FromEmployeeDTO(EmployeeDTO item) => new EmployeeResponse() { Id = item.Id, FamilyMembers = item.FamilyMembers == null ? new List <FamilyMemberResponse>() : FamilyMemberResponse.FromFamilyMember(item.FamilyMembers), IsEmployee = item.IsEmployee, LastName = item.LastName, Name = item.Name, Pets = item.Pets == null ? new List <PetResponse>() : PetResponse.FromPetDTO(item.Pets), PetsCount = item.PetsCount };