Beispiel #1
0
 public TagEntity Create(TagEntity entity)
 {
     try
     {
         _tagRepository.Insert(entity);
         return entity;
     }
     catch (Exception e)
     {
         _log.Error(e,"数据库操作出错");
         return null;
     }
 }
Beispiel #2
0
 public bool Delete(TagEntity entity)
 {
     try
     {
         _tagRepository.Delete(entity);
         return true;
     }
     catch (Exception e)
     {
         _log.Error(e,"数据库操作出错");
         return false;
     }
 }
Beispiel #3
0
        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;
        }