public static FactoryDao Instance() { if (instance == null) { instance = new FactoryDao(); } return(instance); }
public Int64 Modify(Board entity) { Int64 ret = 0; StringBuilder query = new StringBuilder(); ParameterInit(); ParameterAdd("idx", entity.Idx); ParameterAdd("state", Define.STATE_DELETE); query.Append("UPDATE tbl_board set state = @state where idx = @idx"); if (base.Delete(query.ToString(), GetParameter()) > 0) { InsertBoard(entity); Comment comment = new Comment(); ret = ScopeIndentity("tbl_board"); CommentDao dao = FactoryDao.Instance().GetCommentDao(); dao.Modify(entity.Idx,ret); } return ret; }