/// <inheritdoc /> public void Commit() { if (_disposed) { throw new ObjectDisposedException(nameof(UnitOfWork)); } _context?.SaveChanges(); }
public void Create(Comments e) { context.Set <ORM.Comments>().Add(e); context.SaveChanges(); }
//增 public int Add(T s) { dbContext.Set <T>().Add(s); return(dbContext.SaveChanges()); }
//C public int AddEntity(T entity) { dbContext.Set <T>().Add(entity); return(dbContext.SaveChanges()); }
public void Save() => _dbContext.SaveChanges();
/// <summary> /// 提交SQL /// </summary> /// <returns></returns> public int SaveChanges() { return(db.SaveChanges()); }
/// <summary> /// Saves the context /// </summary> public void Save() { Context.SaveChanges(); }
public bool SaveChanges() { return(dbContext.SaveChanges() > 0); }
public void Commit() { db.SaveChanges(); }
public void Commit() { context.SaveChanges(); }