Skip to content

Library for execute queries in databases relational informing a querie specific

Notifications You must be signed in to change notification settings

adriandevid/ExecuteQuery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ExecuteQuery is library open source

This is a library open source for execute queries in postgresql database. Package: https://www.nuget.org/packages/ExecuteQuery/

Execute Mode

First execute the some procedures, is essential create a ConnectionString in appsettings with name DB or create a environment variable with name "DB".

{
    "ConnectionStrings": {
        "DB": "{connectionString}"
    }
}

For execute this library is essential create query with or whithout brackets, an example:

select 
    [rowExample].[columnExample] as [columnNameForMapping]
    [rowExample].[columnExample] 
from [schem].[table] [rowExample]

With the query created, in next level of execution, our let's go create model of return query.

class Model {
    public int [namePropertie] { get; set; }
    public int [namePropertie] { get; set; }
}

Now let's create a instance of object ExecuteQueryNpgsqlUtil:

using ExecuteQuery.Npgsql;

const instanceObject = new ExecuteQueryNpgsqlUtil();

var resultQuery = await instanceObject.ExecuteQuery<Model>([queryCreated]);

By: Adrian Devid Menezes Santos.

Site of creator: adrian devid menezes santos

About

Library for execute queries in databases relational informing a querie specific

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages