Beispiel #1
0
        public void Create(HistoryTable historyTable)
        {
            DateTime tm = DateTime.Now;

            HistoryTable history = new HistoryTable();

            history.Status     = historyTable.Status;
            history.Story_id   = historyTable.ID;
            history.Time_enter = tm;
            history.Comment    = historyTable.Comment;
            db.HistoryTables.Add(history);
            db.SaveChanges();

            var item = db.StoryTables.Where(x => x.ID == historyTable.ID).First();

            item.Status = historyTable.Status;
            db.SaveChanges();
        }
Beispiel #2
0
 public void Update(HistoryTable historyTable)
 {
     db.Entry(historyTable).State = EntityState.Modified;
 }