Esempio n. 1
0
        public static AddConcept CreateWithTags()
        {
            var result = new AddConcept
                             {
                                 AuthorId = 99,
                                 Description = "test-description-add-concept",
                                 Tags = new List<string> { "tag", "concept", "mark" },
                                 Title = "test-title-add-concept"
                             };

            return result;
        }
Esempio n. 2
0
        public long Add(AddConcept concept)
        {
            var tags = this.tagRepository.GetTags(concept.Tags);

            var newConcept = new Concept
                               {
                                   AuthorId = concept.AuthorId,
                                   Description = concept.Description,
                                   Title = concept.Title,
                                   Created = DateTime.Now,
                                   LastUpdate = DateTime.Now,
                                   Tags = tags
                               };

            var id = this.conceptRepository.Add(newConcept);
            return id;
        }