public bool Delete(int id) { using (DbConnection conn = new DbConnection()) { try { GroupInfo.Delete(Where.Equal("GroupID", id)); return(true); } catch (Exception) { return(false); } } }
public bool DeleteGroupInfos(int startId, int endId) { using (DbConnection conn = new DbConnection()) { try { GroupInfo.Delete(Where.And(Where.GreaterOrEqual("ID", startId), Where.LessOrEqual("ID", endId))); return(true); } catch (Exception) { return(false); } } }