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