Skip to content

Commit b242100

Browse files
authored
Update README.md
1 parent ee1f719 commit b242100

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ qs.AddParameter("LastName", "like", "Seinfield");
8383
var results = await EasyORM.ORM.Query<Person>.RunQuerySetAsync(qs);
8484
```
8585

86-
You also have the option of passing the SQL into the query directly. This is great for more complicated queries.
86+
You also have the option of passing the SQL into the query directly. I like this for more complicated queries since I actually like writing SQL. I usually create a model to represent the results and it works well for that.
8787

8888
### Task<List<T>> RunSQLAsync(string sql, CancellationToken cancellationToken = default(CancellationToken))
89-
This is not recommended if you are concatenating SQL
89+
DO NOT CONCATENATE SQL! If you have parameters use the RunParamSQLAsync method below.
9090

9191
```
9292
var results = await EasyORM.ORM.Query<Person>.RunSQLAsync("select * from Person");
@@ -102,7 +102,7 @@ This allows you send SQL to the ORM and it will parameterize it for you.
102102
string lastName = "Seinfeld";
103103
104104
var sql = $"select* from Person p where p.LastName = [lastName|{lastName}]";
105-
// this syntax in the brackets gives your variable a parameter name.
105+
// this syntax in the brackets gives your variable a parameter name named lastName with the value of the variable.
106106
107107
var results = await EasyORM.ORM.Query<Person>.RunParamSQLAsync(sql);
108108
```

0 commit comments

Comments
 (0)