Ejemplo n.º 1
0
        public void Record(string row)
        {
            List <UserSalesModel>    useSalesCache  = _userSalesCache.Get <List <UserSalesModel> >(DataCacheKey.UserSales);
            UserSalesModel           model          = _csvReader.ReadRow <UserSalesModel>(row);
            IList <ValidationResult> validateResult = ValidateModel(model);

            if (validateResult.Count == 0)
            {
                useSalesCache.Add(model);
                _userSalesCache.Create(useSalesCache, DataCacheKey.UserSales, DataCacheDuration.Medium);
            }
        }