public List <AccountBookViewModel> GetAccountBooks() { var accountBooks = new List <AccountBookViewModel>(); var accountBook = new AccountBookEntity().AccountBook.ToList(); foreach (var book in accountBook) { accountBooks.Add(new AccountBookViewModel { Amount = book.Amounttt, Type = ((Category)book.Categoryyy).ToString(), Date = book.Dateee.ToString("yyyy-MM-dd") }); } return(accountBooks); }
public AccountBookDbService(IUnitOfWork unitOfWork) { _db = new AccountBookEntity(); _unitOfWork = unitOfWork; }