SqlSharp 1.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package SqlSharp --version 1.0.2                
NuGet\Install-Package SqlSharp -Version 1.0.2                
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="SqlSharp" Version="1.0.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SqlSharp --version 1.0.2                
#r "nuget: SqlSharp, 1.0.2"                
#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 SqlSharp as a Cake Addin
#addin nuget:?package=SqlSharp&version=1.0.2

// Install SqlSharp as a Cake Tool
#tool nuget:?package=SqlSharp&version=1.0.2                

Generate SqlQuery for your type/object dynamically.

  ============  Query builder example:   ===============

  using SqlSharp;
  using SqlSharp.Query;

  SharpQuery select = SharpQuery
  .Select()
  .Field("Id").As("AccountId") // with alias
  .Field("AccountNumber") //name only
  .Where("account.created", Compare.GreaterThanEqual, "'2018-01-01'") //where clause
  .TopN(100)
  .From("account"); //table

  // sql output
  var sqlQuery = QueryHelper.GetSqlOutput(select);




  ===========   Generate Select dynamically =============
  //Query With Alias:

  // Add a class, Define column name with optional attribute, property name is used as Alias
  public class Account
  {
  [SqlSharp("Account.Id")] // column name
  public string AccountId { get; set; } // alias

  public string AccountNumber { get; set; }

  }

  // generate query:

  Account a = new Account();
  var fields = QueryHelper.GetSelects&lt;Account&gt;(a);


    SharpQuery select = SharpQuery
    .Select()
    .Fields(fields.ToArray())
    .Where("account.created", Compare.GreaterThanEqual, "'2018-01-01'")
    .TopN(100)
    .From("account");


    var sqlOutput = QueryHelper.GetSqlOutput(select);
Product Compatible and additional computed target framework versions.
.NET Framework net471 is compatible.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

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
1.0.3 1,184 5/14/2018
1.0.2 1,014 5/14/2018
1.0.1 909 5/14/2018
1.0.0 984 5/10/2018