Use query params for user strings
This commit is contained in:
@ -169,9 +169,9 @@ public class PCRBService : IPCRBService {
|
||||
if (!bypassCache) pcrb = _cache.Get<PCRB>($"pcrb{title}");
|
||||
|
||||
if (pcrb is null) {
|
||||
string sql = $"select * from CCChangeControl where Title='{title}'";
|
||||
string sql = "select * from CCChangeControl where Title=@Title";
|
||||
|
||||
pcrb = (await _dalService.QueryAsync<PCRB>(sql)).FirstOrDefault();
|
||||
pcrb = (await _dalService.QueryAsync<PCRB>(sql, new { Title = title })).FirstOrDefault();
|
||||
|
||||
if (pcrb is not null) {
|
||||
if (string.IsNullOrWhiteSpace(pcrb.OwnerName) && pcrb.OwnerID > 0)
|
||||
|
Reference in New Issue
Block a user