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

Support Raw Statements #94

Closed
ahmad-moussawi opened this issue Jun 26, 2018 · 3 comments
Closed

Support Raw Statements #94

ahmad-moussawi opened this issue Jun 26, 2018 · 3 comments

Comments

@ahmad-moussawi
Copy link
Contributor

Ability to execute raw statements:

current proposal:

var users = db.Select("SELECT * FROM Users"); -- select data
var affected = db.Update("UPDATE Table set A = ?", new [] {1}); -- to update data
var deleted = db.Delete("DELETE FROM Table"); -- to delete from table
db.Statement("exec StoredProcedure ? ?", new [] {1, 2}); -- execute any other kind of queries
@ahmad-moussawi
Copy link
Contributor Author

ahmad-moussawi commented Jul 4, 2018

Added API:

db.Statement("exec ..."); // to update and execute
db.Select("SELECT * FROM A"); // to select data
db.Select<User>("SELECT * FROM Users");

@weituotian
Copy link

@ahmad-moussawi
is there a doc? what db.Select("SELECT * FROM A") return?

@ahmad-moussawi
Copy link
Contributor Author

I mean by users a list of dynamic, and specifically IEnumerable<dynamic>,
off course you can use the generic overload to return IEnumerable<T>.

I will update this in the doc, do you min open an issue under https://github.com/sqlkata/docs

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