private decimal?GetPriceValue(EPI.Price price) { var result = price != null ? (decimal)price.Value : (decimal?)null; return(result); }
private string GetDisplayName(EPI.Price price) { var result = string.IsNullOrEmpty(price.Base64DisplayName) ? price.DisplayName : Encoding.UTF8.GetString(Convert.FromBase64String(price.Base64DisplayName)); return(result); }
private void TryInsertMetaData(EPI.Price price, string key) { if (price != null && !_metaDataWasCreated.Contains(key)) { var entity = new Entity.tEnhancedPurchaseInfoMetaData() { EnhancedPurchaseInfoFieldName = key, Description = GetDisplayName(price), }; _context.tEnhancedPurchaseInfoMetaData.Add(entity); _metaDataWasCreated.Add(key); } }