Пример #1
0
        public BugAttributes Update(BugAttributes bugChanges)
        {
            var bug = context.Bugs.Attach(bugChanges);

            bug.State = Microsoft.EntityFrameworkCore.EntityState.Modified;
            context.SaveChanges();
            return(bugChanges);
        }
Пример #2
0
 public BugAttributes Add(BugAttributes bug)
 {
     context.Bugs.Add(bug);
     context.SaveChanges();
     return(bug);
 }