예제 #1
0
        public async Task <ExpenseItem> CreateAsync(decimal amount)
        {
            var expenseItem = new ExpenseItem
            {
                Amount   = amount,
                Occurred = DateTimeOffset.UtcNow
            };

            await table.InsertAsync(expenseItem);

            return(expenseItem);
        }
예제 #2
0
 public ExpenseItemViewModel(ExpenseItem expense)
 {
     Amount = expense.Amount.ToString("C");
     Occurred = expense.Occurred.ToLocalTime().ToString("f");
 }