コード例 #1
0
 public void EditBudget(BillsData.Budget budget)
 {
     budget.ModyficationDate = DateTime.Now;
     context.Update(budget);
     // var createDate = context.Budgets.FirstOrDefault(a => a.Id == id).CreateDate;
     // budget.CreateDate = createDate;
     context.SaveChangesAsync();
 }
コード例 #2
0
 public void Add(BillsData.Budget budget)
 {
     budget.CreateDate       = DateTime.Now;
     budget.ModyficationDate = DateTime.Now;
     budget.UserId           = GetCurrentUserId();
     context.Add(budget);
     context.SaveChanges();
 }