public string DeleteTag(string id) { var tagdal = new TagDal(); var model = tagdal.GetFirst(x => x.UID == id); if (model == null) { return("数据不存在"); } return(tagdal.Delete(model) > 0 ? SUCCESS : "删除失败"); }
public string DeleteTag(int id) { if (id <= 0) { return("ID为空"); } var tagdal = new TagDal(); var model = tagdal.GetFirst(x => x.TagID == id); if (model == null) { return("数据不存在"); } return(tagdal.Delete(model) > 0 ? SUCCESS : "删除失败"); }