示例#1
0
        public override IList <TItem> ReadItems <TItem>()
        {
            var fileManager = new CsvFileManager(typeof(TItem));
            var items       = fileManager.Load(GetFullPath <TItem>());

            return(Convert <TItem>(items).ToList());
        }
示例#2
0
        public override void SaveChanges(IList items, Type type)
        {
            if (items == null || items.Count == 0)
            {
                return;
            }
            var fileManager = new CsvFileManager(type);

            fileManager.Save(items as IEnumerable <object>, GetFullPath(type));
        }
示例#3
0
        public override void SaveChanges <TItem>(IList <TItem> items)
        {
            if (items == null || items.Count == 0)
            {
                return;
            }
            var fileManager = new CsvFileManager(typeof(TItem));

            fileManager.Save(items as IEnumerable <object>, GetFullPath <TItem>());
        }