Example #1
0
 public void Delete(DalTopicTag entity)
 {
     if (entity == null) throw new ArgumentNullException("entity");
     Delete(entity.Id);
 }
Example #2
0
        private void UpdateInfo(TopicTag topicTag, DalTopicTag dalTopicTag)
        {
            if (topicTag == null || dalTopicTag == null) throw new ArgumentNullException();

            topicTag.Id = dalTopicTag.Id;
            topicTag.Tag = dalTopicTag.Tag;
        }
Example #3
0
 public void Update(DalTopicTag entity)
 {
     if (entity == null) throw new ArgumentNullException("entity");
     var existedEntity = _dbSetTopicTags.Find(entity.Id);
     UpdateInfo(existedEntity, entity);
 }
Example #4
0
 private TopicTag ToOrmTopicTag(DalTopicTag dalTopicTag)
 {
     if (dalTopicTag == null) return null;
     var newTopicTag = new TopicTag();
     UpdateInfo(newTopicTag, dalTopicTag);
     return newTopicTag;
 }
Example #5
0
 public void Insert(DalTopicTag entity)
 {
     if (entity == null) throw new ArgumentNullException("entity");
     _dbSetTopicTags.Add(ToOrmTopicTag(entity));
 }