SunnyUI.SqlSugar 5.1.4.66

There is a newer version of this package available.
See the version list below for details.
dotnet add package SunnyUI.SqlSugar --version 5.1.4.66                
NuGet\Install-Package SunnyUI.SqlSugar -Version 5.1.4.66                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SunnyUI.SqlSugar" Version="5.1.4.66" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SunnyUI.SqlSugar --version 5.1.4.66                
#r "nuget: SunnyUI.SqlSugar, 5.1.4.66"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install SunnyUI.SqlSugar as a Cake Addin
#addin nuget:?package=SunnyUI.SqlSugar&version=5.1.4.66

// Install SunnyUI.SqlSugar as a Cake Tool
#tool nuget:?package=SunnyUI.SqlSugar&version=5.1.4.66                
class Program
    {
        static void Main(string[] args)
        {
            //创建连接
            DAL.InitSqlite("Test.db");

            //显示日志
            DAL.WriteLogToConsole = true;

            //判断连接状态
            Console.WriteLine("Connection state: " + DAL.Connected);
            if (!DAL.Connected)
            {
                //创建数据库
                DAL.CreateDatabase();
            }

            Test();

            Console.WriteLine("按任意键退出。");
            Console.ReadKey();
        }

        private static async void Test()
        {
            //更新连接状态(InitMySql 和 CreateDatabase 会自动调用)
            Console.WriteLine("Connection state: " + DAL.Connected);

            if (DAL.Connected)
            {
                //创建数据表
                DAL.CreateTable<NewTable>();

                //生成数据表实体类
                DAL.CreateClassFile("C:\\", "DBAuth");

                //调用 DAL.Client(SqlSugarClient)处理数据
                DAL.Client.Queryable<NewTable>().ToList();

                //Console.Clear();

                Console.WriteLine(DAL.DeleteAll<NewTable>());

                //根据主键获取对象
                NewTable test = DAL.Queryable<NewTable>(2);
                if (test == null)
                {
                    test = new NewTable();
                }

                var t = await test.InsertAsync();

                Console.WriteLine(DAL.DeleteAll<NewTable>());

                test.fvcName = "ddddd";
                Console.WriteLine(test.Upsert());

                var list = DAL.GetSimpleClient<NewTable>().GetList();
                Console.WriteLine(list.Count);
                Console.WriteLine(DAL.Count<NewTable>());
                //根据主键删除对象
                DAL.Deleteable<NewTable>(2);
            }
        }
    }
Product Compatible and additional computed target framework versions.
.NET Framework net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 is compatible.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.5

  • .NETFramework 4.7.2

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
5.1.4.154 259 5/3/2024
5.1.4.128 251 12/19/2023
5.1.4.124 240 11/26/2023
5.1.4.112 243 10/29/2023
5.1.4.105 326 9/9/2023
5.1.4.100 313 8/18/2023
5.1.4.73 464 5/17/2023
5.1.4.66 454 4/8/2023
5.1.4.58 435 3/11/2023
5.1.3.52 446 2/24/2023
5.1.3.45 474 1/13/2023
5.1.3.43 507 1/8/2023
5.1.3.41 473 12/21/2022
5.1.3.35 471 11/30/2022
5.1.3.34 476 11/22/2022
5.1.3.32 535 11/19/2022
5.0.9.1 737 6/28/2022
5.0.6.4 728 4/7/2022
5.0.6.1 609 3/26/2022
5.0.5.9 605 3/11/2022
5.0.5.8 601 3/10/2022
5.0.5.5 617 3/8/2022