Exemplo n.º 1
0
 public static entity.Contact AsEntity(this ContactDocument contact)
 => new entity.Contact(contact.Id,
                       contact.Name,
                       contact.Surname,
                       contact.CompanyName,
                       contact.CreatedAt,
                       contact.ContactInfos.Select(p => new ContactInfo(p.InfoContent, p.InfoType, p.CreatedAt)));
Exemplo n.º 2
0
 public static ContactDto AsDto(this ContactDocument document)
 => new ContactDto
 {
     Id          = document.Id,
     Name        = document.Name,
     Surname     = document.Surname,
     CompanyName = document.CompanyName
 };
Exemplo n.º 3
0
 public static ContactDetailDto AsDetailDto(this ContactDocument document)
 => new ContactDetailDto
 {
     Id           = document.Id,
     Name         = document.Name,
     Surname      = document.Surname,
     CompanyName  = document.CompanyName,
     ContactInfos = document.ContactInfos.Select(p => new ContactInfoDto
     {
         InfoContent = p.InfoContent,
         InfoType    = p.InfoType.ToString(),
     })
 };