public static DBR.Contact ToEntity(Dto.Contact contact) { if (contact == null) { return(null); } var newContact = new DBR.Contact { ContactId = contact.ContactId, ServiceProvider = contact.ServiceProvider, ContactName = contact.Name, Title = contact.Title, Email = contact.Email, Address = contact.Address, Phone = contact.Phone, Notes = contact.Notes }; return(newContact); }
public async Task <Dto.Contact> SaveContactAsync(Dto.Contact contact) { var updatedContact = await UnitOfWork.SaveContactAsync(Converter.ToEntity(contact)); return(Converter.ToModel(updatedContact)); }