Пример #1
0
        private Item FindItemOnDate(DateTime date)
        {
            var items = database.GetItems().Where(i => i.Date == date).ToList();

            if (!items.Any())
            {
                return(null);
            }

            if (items.Count > 1)
            {
                return(null);
            }

            return(items[0]);
        }
Пример #2
0
 private void GetItems()
 {
     items = database.GetItems().OrderByDescending(i => i.Date).ToList();
 }