public void Update(T entity) { MBTIEntities context = CreateContext(); context.Entry(entity).State = EntityState.Modified; context.SaveChanges(); }
public void Delete(T entity) { MBTIEntities context = CreateContext(); context.Entry(entity).State = EntityState.Deleted; context.SaveChanges(); }
public void Insert(T entity) { MBTIEntities context = CreateContext(); context.Entry(entity).State = EntityState.Added; context.SaveChanges(); }