コード例 #1
0
        public void Update(WatchListGroup group)
        {
            if (group.WatchListGroupId == 0)
            {
                throw new System.Exception("Group does not exists");
            }

            var watchList = _watchListRepository.GetById(group.WatchListGroupId);

            if (watchList == null)
            {
                throw new System.Exception("Group does not exists");
            }

            _watchListRepository.Attach(watchList);
            watchList.InjectFrom(group);
            _watchListRepository.SaveChanges();
        }