Query First Save Abandoned

Typed raw SQL for everybody ! This is the original VS Extension.

Project README

query-first

A much smarter way to work with SQL.

Query first is a "lightweight, low ceremony" data access tech, for working with SQL in C# projects. Develop your queries using the QueryFirst .sql template (in Visual C# items). When you save your file, QueryFirst will generate a wrapper class and a POCO for your results.

You will need to install the VSIX, then in your project, create qfconfig.json beside or above your .sql files. To create a query, choose New QueryFirstQuery from the Add => New Item dialogue.

// qfconfig.json
{
  "defaultConnection": "Data Source=localhost;Initial Catalog=Northwind;Integrated Security=True",
  "provider:["System.Data.SqlClient"(the default)/"MySql.Data.MySqlClient"/"Npgsql"],
  "helperAssembly":[pathToDll],
  "makeSelfTest":true/false
} 

// QfRuntimeConnection.cs
using System.Data;
using System.Data.SqlClient;

namespace CoreWebAppSqlServer
{
    public class QfRuntimeConnection
    {
        public static IDbConnection GetConnection()
        {
            return new SqlConnection("Data Source=localhost;Initial Catalog=Northwind;Integrated Security=True");
        }
    }
}

Nikhil Gupta, this is Simon Boddy, [email protected], proving ownership of this repo !

Read more and download the VSIX here. There's a little code project article here.

Open Source Agenda is not affiliated with "Query First" Project. README Source: bbsimonbb/query-first
Stars
75
Open Issues
17
Last Commit
1 year ago
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating