public TagEntity Create(TagEntity entity) { try { _tagRepository.Insert(entity); return entity; } catch (Exception e) { _log.Error(e,"数据库操作出错"); return null; } }
public bool Delete(TagEntity entity) { try { _tagRepository.Delete(entity); return true; } catch (Exception e) { _log.Error(e,"数据库操作出错"); return false; } }
public bool Post(TagModel model) { var entity = new TagEntity { Tag = model.Tag, Adduser = model.Adduser, Addtime = model.Addtime, UpdUser = model.UpdUser, UpdTime = model.UpdTime, // Content = model.Content, }; if(_TagService.Create(entity).Id > 0) { return true; } return false; }