public bool RemoveFavoriteCategory(FavoriteDbCategory cat) { String query = string.Format("delete from Favorite_Categories where CAT_ID = '{0}'", cat.Id); m_db.Execute(query); return(m_db.ChangedRows() > 0); }
public FavoriteCategory(FavoriteDbCategory favCat, SiteUtilBase util, SiteUtilBase favUtil) { Site = util; FavSite = favUtil; FavoriteDbCategory = favCat; Name = favCat.Name; Description = favCat.Description; Thumb = favCat.Thumb; }
public FavoriteCategory(FavoriteDbCategory favCat, SiteUtilBase util, SiteUtilBase favUtil) { Site = util; FavSite = favUtil; FavoriteDbCategory = favCat; Name = favCat.Name; Description = favCat.Description; Thumb = favCat.Thumb; }
public bool RemoveFavoriteCategory(FavoriteDbCategory category) { using (var cnn = OpenConnection()) { using (var cmd = cnn.CreateCommand()) { string sql = string.Format("delete from Favorite_Categories where CAT_ID = '{0}'", category.Id); cmd.CommandText = sql; return(cmd.ExecuteNonQuery() > 0); } } }
public bool RemoveFavoriteCategory(FavoriteDbCategory cat) { String query = string.Format("delete from Favorite_Categories where CAT_ID = '{0}'", cat.Id); m_db.Execute(query); return m_db.ChangedRows() > 0; }