public List <MoneyUsage> GetAccountingDataList()
        {
            var result = new List <MoneyUsage>();

            using (var db = new AccountBookDbContext())
            {
                var query = db.AccountBook.Select(s => new MoneyUsage()
                {
                    CostType = ((CostCategoryEnum)s.Categoryyy).ToString(),
                    CostDate = s.Dateee,
                    Amount   = s.Amounttt
                });

                result = query.ToList();
            }

            return(result);
        }
Esempio n. 2
0
 public BooksResult()
 {
     this.db = new AccountBookDbContext();
 }