public async Task <ContactAggregate> GetContactByIdAsync(string contactId) { ContactAggregate result = null; if (!contactId.IsNullOrEmpty()) { var member = await _memberService.GetByIdAsync(contactId, null, nameof(Contact)); if (member is Contact contact) { result = new ContactAggregate(contact); } } return(result); }
public Task SaveAsync(ContactAggregate contactAggregate) { return(_memberService.SaveChangesAsync(new[] { contactAggregate.Contact })); }