Beispiel #1
0
 public void Delete(DalTopicTag entity)
 {
     if (entity == null) throw new ArgumentNullException("entity");
     Delete(entity.Id);
 }
Beispiel #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;
        }
Beispiel #3
0
 public void Update(DalTopicTag entity)
 {
     if (entity == null) throw new ArgumentNullException("entity");
     var existedEntity = _dbSetTopicTags.Find(entity.Id);
     UpdateInfo(existedEntity, entity);
 }
Beispiel #4
0
 private TopicTag ToOrmTopicTag(DalTopicTag dalTopicTag)
 {
     if (dalTopicTag == null) return null;
     var newTopicTag = new TopicTag();
     UpdateInfo(newTopicTag, dalTopicTag);
     return newTopicTag;
 }
Beispiel #5
0
 public void Insert(DalTopicTag entity)
 {
     if (entity == null) throw new ArgumentNullException("entity");
     _dbSetTopicTags.Add(ToOrmTopicTag(entity));
 }