private static CustomerModel SafeCreate(dsCustomerList.CustomersRow row) { return(new CustomerModel() { FirstName = row.Iscustomer_first_nameNull() ? string.Empty : row.customer_first_name, LastName = row.Iscustomer_last_nameNull() ? string.Empty : row.customer_last_name, Name = row.Iscustomer_nameNull() ? string.Empty : row.customer_name, Title = row.Iscustomer_titleNull() ? string.Empty : row.customer_title, Email = row.Iscustomer_emailNull() ? string.Empty : row.customer_email, Password = row.Iscustomer_passwordNull() ? string.Empty : row.customer_password, CompanyName = row.Iscustomer_company_nameNull() ? string.Empty : row.customer_company_name, Phone = row.Iscustomer_phoneNull() ? string.Empty : row.customer_phone, PhoneWork = row.Iscustomer_phone_workNull() ? string.Empty : row.customer_phone_work, Fax = row.Iscustomer_faxNull() ? string.Empty : row.customer_fax, CreationDate = row.Iscr_dtNull() ? DateTime.Now : row.cr_dt, LastLogin = row.Islu_dtNull() ? DateTime.Now : row.lu_dt, CustomerId = row.Iscustomer_cdNull() ? string.Empty : row.customer_cd, CustomerGuid = row.Iscustomer_guidNull() ? Guid.Empty : row.customer_guid, Attention = row.Iscustomer_attentionNull() ? string.Empty : row.customer_attention, Address = row.Iscustomer_addressNull() ? string.Empty : row.customer_address, Address2 = row.Iscustomer_address2Null() ? string.Empty : row.customer_address2, City = row.Iscustomer_cityNull() ? string.Empty : row.customer_city, StateAbbrev = row.Iscustomer_state_abbrevNull() ? string.Empty : row.customer_state_abbrev, CountryCode = row.Iscustomer_country_cdNull() ? string.Empty : row.customer_country_cd, PostalCode = row.Iscustomer_postal_codeNull() ? string.Empty : row.customer_postal_code, Shipping_Address = row.Iscustomer_saddressNull() ? string.Empty : row.customer_saddress, Shipping_Address2 = row.Iscustomer_saddress2Null() ? string.Empty : row.customer_saddress2, Shipping_Attention = row.Iscustomer_sattentionNull() ? string.Empty : row.customer_sattention, Shipping_City = row.Iscustomer_scityNull() ? string.Empty : row.customer_scity, Shipping_CompanyName = row.Iscustomer_scompany_nameNull() ? string.Empty : row.customer_scompany_name, Shipping_CountryCode = row.Iscustomer_scountry_cdNull() ? string.Empty : row.customer_scountry_cd, Shipping_Phone = row.Iscustomer_sphoneNull() ? string.Empty : row.customer_sphone, Shipping_PostalCode = row.Iscustomer_spostal_codeNull() ? string.Empty : row.customer_spostal_code, Shipping_StateAbbrev = row.Iscustomer_sstate_abbrevNull() ? string.Empty : row.customer_sstate_abbrev }); }