Пример #1
0
        public virtual void Update(T entity)

        {
            T dbentity = dbSet.FirstOrDefault(x => x.id == entity.id);

            ClassDataTransfer.EntityTransmitter(entity, dbentity);
        }
Пример #2
0
        public void CSharpDataTest()
        {
            var file     = new FileInfo(FileName);
            var transfer = new ClassDataTransfer(file);

            transfer.Save(CurrentDirectory, true);
            Assert.IsTrue(true);
        }
Пример #3
0
        /// <summary>
        /// This function is the callback used to execute the command when the menu item is clicked.
        /// See the constructor to see how the menu item is associated with this function using
        /// OleMenuCommandService service and MenuCommand class.
        /// </summary>
        /// <param name="sender">Event sender.</param>
        /// <param name="e">Event args.</param>
        private void Execute(object sender, EventArgs e)
        {
            ThreadHelper.ThrowIfNotOnUIThread();
            var sourceFile = ServiceProvider.GetCurrentFile();

            if (sourceFile?.Exists != true || !sourceFile.Extension.Equals(".cs", StringComparison.OrdinalIgnoreCase))
            {
                return;
            }

            var transfer = new ClassDataTransfer(sourceFile);

            transfer.Save();
        }