Ejemplo n.º 1
0
        public override void Create(ShoppingListDto dto)
        {
            var list = new ShoppingList
            {
                Id               = dto.Id,
                Name             = dto.Name,
                Path             = dto.Path,
                Timestamp        = DateTime.Now,
                ChosenSorting_Id = dto.ChosenSortingId
            };

            var link = new LinkUserToList
            {
                UserId           = dto.UserId,
                ShoppingListId   = dto.Id,
                ListAccessTypeId = dto.ListAccessTypeId,
            };

            _listRepository.Create(list, link);
        }