public void Add(Site entity) { if (this._currentSite == null) { this._currentSite = entity; } else { throw new Exception("网站已经安装,不可重复操作"); } this._op = Persistence.DbOperation.Insert; }
public void Update(Site entity) { this._currentSite = entity; this._op = Persistence.DbOperation.Update; }