moved the string update sql statement to a constant with the other procedures in SQLiteProcedures
#56
This commit is contained in:
parent
abf8833ba6
commit
72799981b6
@ -34,6 +34,10 @@ namespace SQLiteRepository
|
||||
"update " + nameof(CardUniqueId) + " set " + nameof(CardUniqueId.UserId_FK) + "=? where " +
|
||||
nameof(CardUniqueId.Id) + "=?";
|
||||
|
||||
public const string UPDATE_CARD_LAST_USED =
|
||||
"update " + nameof(CardUniqueId) + " set " + nameof(CardUniqueId.LastUsed) + " = ? where " +
|
||||
nameof(CardUniqueId.Id) + " = ?";
|
||||
|
||||
public const string SEARCH_USER_LIST =
|
||||
"SELECT * FROM " + nameof(UserIdentity) + " where(" + nameof(UserIdentity.FirstName) + " Like ? OR " +
|
||||
nameof(UserIdentity.LastName) + " Like ?)";
|
||||
|
||||
@ -546,7 +546,7 @@ namespace SQLiteRepository
|
||||
|
||||
private void UpdateIdentifierLastUsed(DateTimeOffset dt, int cardId)
|
||||
{
|
||||
var res = _connection.ExecuteScalar<CardUniqueId>("update CardUniqueId set LastUsed = ? where Id = ?",
|
||||
var res = _connection.ExecuteScalar<CardUniqueId>(SQLiteProcedures.UPDATE_CARD_LAST_USED,
|
||||
dt,
|
||||
cardId);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user