public bool UpdatePresentList(List <int> products, int idList) { var newPresentlist = new PresentList() { PresentListID = idList, Presents = products.Select(id => new Present() { PresentListID = idList, ProductID = id }).ToList() }; return(presentListRepository.Update(newPresentlist)); }