public async Task<AdminEmailAddressModel> Validate(AdminEmailAddressModel model) { if (model.Address == string.Empty) throw new AddressLine1IsRequiredException(); model.Type = await _adminLookupItemsService.GetItem("Email Address Types", model.Type.Id); return model; }
public AdminEmailAddress(AdminEmailAddressModel model) { Type = new AdminLookupItemValue(model.Type); Address = model.Address; }