public async Task <SystemEmailAddressModel> Validate(SystemEmailAddressModel model) { if (model.Address == string.Empty) { throw new AddressLine1IsRequiredException(); } model.Type = await _systemLookupItemService.GetItem("Email Address Types", model.Type.Id); return(model); }
public SystemEmailAddress(SystemEmailAddressModel model) { Type = new SystemLookupItemValue(model.Type); Address = model.Address; }