Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can we use T_HAZIRMETIN table name and column name in QueryBuilder. without using nameof. #533

Closed
mummyildiz opened this issue Oct 16, 2021 · 1 comment

Comments

@mummyildiz
Copy link

mummyildiz commented Oct 16, 2021

public class T_HAZIRMETIN
{
public string TID { get; set; }
public string TANAHTAR { get; set; }
}


            var q = db.Query(nameof(DbTables.Entities.T_HAZIRMETIN))
                         .Where(nameof(DbTables.Entities.T_HAZIRMETIN.TID), ">", 0)
                         .WhereIn(nameof(DbTables.Entities.T_HAZIRMETIN.TID), new[] { 1, 2 })
                         .OrderByDesc(nameof(DbTables.Entities.T_HAZIRMETIN.TID))
                        .Select(nameof(DbTables.Entities.T_HAZIRMETIN.TID), nameof(DbTables.Entities.T_HAZIRMETIN.TANAHTAR));

            var data =q.GetAsync<DbTables.Entities.T_HAZIRMETIN>();
            dgData.DataSource = data.Result.ToList();

How can we use T_HAZIRMETIN table name and column name in QueryBuilder.
without using nameof.

@mummyildiz mummyildiz changed the title sqlkata querybuilder How can we use T_HAZIRMETIN table name and column name in QueryBuilder. without using nameof. Oct 16, 2021
@ahmad-moussawi
Copy link
Contributor

@mummyildiz sorry but didn't get the issue here, I think Stackoverflow is better for such questions.
I will close this now, feel free to comment for further details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants