public void ListRepository_GetAllItems() { var items = _listRepository.FindAll(); var initialCount = items.Count; var testEntity = GetTestEntity(); _listRepository.Create(testEntity); Assert.IsTrue(_listRepository.FindAll().Count == (initialCount + 1)); Assert.IsTrue(_listRepository.Delete(testEntity)); Assert.IsTrue(_listRepository.FindAll().Count == initialCount); }
public Task <string> Execute(CreateListCommand command) { var list = new List { Id = Guid.NewGuid().ToString(), Name = command.Name }; return(repo.Create(list)); }
public async Task <ActionResult <bool> > CreateList([FromBody] ListDTO listDTO) { return(Ok(await _listRepository.Create(listDTO))); }
public void Create(List list) { _listRepository.Create(list); }