示例#1
0
        private List <Basket> GetAll()
        {
            string UserDirectory = @"C:\Users\Chanuka\source\repos\Saga\DataLayer\Data\baskets.csv";

            List <Basket> lines = File.ReadAllLines(UserDirectory)
                                  .Skip(1)
                                  .Select(x => SagaHelpers.FromCSV(x))
                                  .OrderByDescending(x => x.CreatedDateTime)
                                  .ToList();

            return(lines);
        }
示例#2
0
        private List <Basket> GetAll()
        {
            string UserDirectory = @"../DataLayer/Data/baskets.csv";

            List <Basket> lines = File.ReadAllLines(UserDirectory)
                                  .Skip(1)
                                  .Select(x => SagaHelpers.FromCSV(x))
                                  .OrderByDescending(x => x.CreatedDateTime)
                                  .ToList();

            return(lines);
        }