void IFormRepository.Remove_3(int Id) { table_3 Table_3 = context.table_3s.Find(Id); context.table_3s.Remove(Table_3); context.SaveChanges(); }
void IFormRepository.Update_3(table_3 Table_3) { context.Attach(Table_3); context.Entry(Table_3).Property("Options").IsModified = true; context.SaveChanges(); /* * var table_update = context.table_3s.Attach(Table_3); * table_update.State = Microsoft.EntityFrameworkCore.EntityState.Modified; * context.SaveChanges(); */ }
void IFormRepository.Add_3(table_3 Table_3) { context.table_3s.Add(Table_3); context.SaveChanges(); context.Entry(Table_3).State = EntityState.Detached; }