Exemplo n.º 1
0
        public bool UpdateProperty(PropertyChangeModel changeModel)
        {
            if (changeModel.HasIdChanged)
            {
                _context.Delete(new Property {
                    Id = changeModel.OriginalId
                });
                _context.Add(changeModel.Property);
                return(true);
            }

            return(_context.Update(changeModel.Property));
        }
Exemplo n.º 2
0
        private void Clear()
        {
            var prop    = new Property();
            var counter = 0;

            foreach (var item in helpStructure)
            {
                ++counter;
                prop.Id = item.Key;
                if (!hashing.Delete(prop))
                {
                    Console.WriteLine("Cannot delete: " + prop.Id);
                }
            }
        }