public TagViewModel Index(TagSetupViewModel inModel) { if (inModel.Tag.IsEmpty()) return new TagViewModel(); var tag = _repository.Query<Tag>().Where(p => p.Name == inModel.Tag).FirstOrDefault(); // TODO: Currently tags are not unique if (tag == null) return new TagViewModel(); return new TagViewModel { Tag = tag }; }
public TagViewModel Index(TagSetupViewModel inModel) { if (inModel.Tag.IsEmpty()) { return(new TagViewModel()); } var tag = _repository.Query <Tag>().Where(p => p.Name == inModel.Tag).FirstOrDefault(); // TODO: Currently tags are not unique if (tag == null) { return(new TagViewModel()); } return(new TagViewModel { Tag = tag }); }