Redis開發學習(4)_StackExchange.Redis_進行String相關操作

在一些資料整理上有提到雖然目前針對.NET 釋出相關Redis Client API 不只一個StackExchanged.Redis 但是ServiceStack是要付費的!!!!!!! 而且在舊新版本的切換上據說語法也會有不相容的問題 (1)資料塞入指令 寫法1.透過StringSet 1 IDatabaseObject.StringSet( "Key" , "value" ); 寫法2.透過Execute方式 1 IDatabaseObject.Execute( "SET" , "Key" , "Value" ); 程式碼 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using StackExchange.Redis; namespace RedisProject1 { class Program { static void Main( string [] args) { Console.WriteLine( "啟動資料庫連線" ); ConnectionMultiplexer myConn = ConnectionMultiplexer.Connect( "localhost:6379" ); var myEndpoints = myConn.GetEndPoints(); ...