Ejemplo n.º 1
0
        private void AddPropertyCheckListItem(ChainsDBEntities context, Guid propertyId, List <CheckListItem> checkListItems)
        {
            var propertyCheckListItemsToAdd = new List <PropertyCheckListitem>();

            foreach (var checkListItem in checkListItems)
            {
                propertyCheckListItemsToAdd.Add(new PropertyCheckListitem {
                    Id = _guidRepository.NewGuid(), CheckListItemId = checkListItem.Id, Created = _dateRepository.Now(), PropertyId = propertyId
                });
            }

            _databaseRepository.AddPropertyCheckListItems(context, propertyCheckListItemsToAdd);
        }