首頁
Technology Blog
Cancel

C# Unit Testing Use NUnit

快速建立專案的示範影片 選擇測試專案 選擇1.建立NUnit測試專案 直接建立NUnit 測試專案 選擇2.建立MSTest測試專案 直接建立MSTest測試專案,並安裝NUnit相關套件 安裝NUnit 與 NUnit3TestAdapter NUnit: NuGet\Install-Package NUnit -Version 3.13.3 NUnit3TestAda...

C# DI Container Use Autofac

使用以下套件 NuGet\Install-Package Autofac -Version 6.3.0 Code Example 使用下來,覺得在使用MVC的時候效果最明顯 Autofac NuGet\Install-Package Autofac -Version 6.3.0 Autofac.Mvc5 NuGet\Install-Package Autofac...

C# Connect MSSQL Use Entity Framework Repository Pattern

快速建立Repository Pattern的影片教學 詳見以下影片與GIT資源直接簡單建立檔案 Github Source Code 1.完成新增ADO.NET的操作 如「Entity Framework Code First if DataBase Exist-1」 2.Creat New Class Name: IRepository.cs using System; usi...

AutoIT Decrypt And Encryption

AutoIT的加密 與 解密 加密 #include <Crypt.au3> ; #include <MsgBoxConstants.au3> ; $sSourceData = "Yyds2241" ; 待加密資料 $sKey = "iamisakey" ; 加密用的 key $algorithm ...

C# WebBrowser Automation Login

首先需要安裝套件 其一:Selenium.WebDriver NuGet\Install-Package Selenium.WebDriver -Version 4.5.1 其二:Selenium.WebDriver.ChromeDriver ( 版本需依據本地Chrome的版本微調) NuGet\Install-Package Selenium.WebDriver.Chr...

C# Web Browser Automation Login Windows Authentication Use AutoIT

開啟新的Visual Studio專案,會使用以下套件 其一:Selenium.WebDriver NuGet\Install-Package Selenium.WebDriver -Version 4.5.1 其二:Selenium.WebDriver.ChromeDriver ( 版本需依據本地Chrome的版本微調) NuGet\Install-Package Sel...

AutoIT Change PowerPoint Default Theme

曾經遇到過要希望能讓全公司的人在使用PPT時,一打開PPT就有公司預設模板的問題 當時是使用AutoIT製作一個exe檔, 將公司的PPT模板放置在網路路徑上 然後透過這個Exe來Copy預設模板,並蓋掉User本機PPT預設模板 備註:須將檔案放置在 C:\Users\AppData\Roaming\Microsoft\Templates  底下,且檔名需要改成blank.potx ...

SQL Stored Procedure Example

建立Store Procedure Source Code: /****** Object: StoredProcedure [dbo].[spMember] Script Date: 2022/10/31 下午 04:10:54 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON ...

SQL Trigger Example

透過Trigger紀錄資料異動的紀錄 1.首先會有一個主資料表 Source Code: USE [DemoDB] GO /****** Object: Table [dbo].[Member] Script Date: 2022/10/30 下午 11:23:35 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDEN...

SQL Subquery Example

使用With As 來達到子查詢的方式 範例資料表如圖所示 第一次搜尋,試著尋找與字母CD有關的資料,Main為自定義變數 Source Code: with Main as ( SELECT TOP (1000) [UserID] ,[UserName] ,[UserEmail] FROM [DemoDB].[dbo].[Memb...