Exemplo n.º 1
0
        internal static AccountInformationGeneric MapValue(Account_Information_Generic value)
        {
            AccountInformationGeneric info = null;

            try
            {
                info = new AccountInformationGeneric()
                {
                    AccountId = value.Account_Information_Generic_Value.FirstOrDefault() != null ? value.Account_Information_Generic_Value.FirstOrDefault().AccountId : 0,
                    AccountInformationGenericId = value.Id,
                    Id = value.Account_Information_Generic_Value.FirstOrDefault() != null ? value.Account_Information_Generic_Value.FirstOrDefault().Id : 0,
                    Value = value.Account_Information_Generic_Value.FirstOrDefault() != null ? value.Account_Information_Generic_Value.FirstOrDefault().Value : "",
                    Name = value.Name
                };
            }
            catch (Exception ex)
            {
                LogHelper.LogError(string.Format("Couldn't map AccountInformationGeneric: MapValue(Account_Information_Generic value)"), ex, 0);
            }

            return info;
        }
Exemplo n.º 2
0
        internal static AccountInformationGeneric MapValue(Account_Information_Generic value)
        {
            AccountInformationGeneric info = null;

            try
            {
                info = new AccountInformationGeneric()
                {
                    AccountId = value.Account_Information_Generic_Value.FirstOrDefault() != null?value.Account_Information_Generic_Value.FirstOrDefault().AccountId : 0,
                    AccountInformationGenericId = value.Id,
                    Id    = value.Account_Information_Generic_Value.FirstOrDefault() != null?value.Account_Information_Generic_Value.FirstOrDefault().Id    : 0,
                    Value = value.Account_Information_Generic_Value.FirstOrDefault() != null?value.Account_Information_Generic_Value.FirstOrDefault().Value : "",
                    Name  = value.Name
                };
            }
            catch (Exception ex)
            {
                LogHelper.LogError(string.Format("Couldn't map AccountInformationGeneric: MapValue(Account_Information_Generic value)"), ex, 0);
            }

            return(info);
        }