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