public async Task <long> CreateCart(CreateCartDto createCartDto) { var count = await _cartsRepository.GetCountCartsInList(createCartDto.ListId); var cart = new Cart() { Name = createCartDto.Name, Description = createCartDto.Description, ListId = createCartDto.ListId, Position = count }; _cartsRepository.Insert(cart); await _cartsRepository.SaveChangesOnContext(); var list = await _listsRepository.GetEntity(createCartDto.ListId); return(list.BoardId); }