public void TestIf_All_ReturnsCorrectNumberOfTags() { this.context.Tags.AddRange(new List <Tag> { new Tag(), new Tag(), new Tag() }); this.context.SaveChanges(); Assert.NotEmpty(context.Tags); Assert.Equal(3, tagService.All().Count()); }
public IActionResult Create() { this.ViewData["Categories"] = categoryService.GetCategories() .Select(p => new SelectListItem { Value = p.Id.ToString(), Text = p.Name }); this.ViewData["Tags"] = tagService.All() .Select(p => new SelectListItem { Value = p.Id.ToString(), Text = p.Name }); return(View()); }
private List <TagResource> GetAllTags() { return(_tagService.All().ToResource()); }
public List <TagResource> GetAll() { return(_tagService.All().ToResource()); }