Bug fix: Error thrown on list containing null item

This commit is contained in:
Bobbie Hodgetts
2020-09-23 13:09:24 +01:00
parent 9ec07b8703
commit dcd32b76fa
2 changed files with 6 additions and 0 deletions

View File

@@ -125,6 +125,8 @@ namespace bnhtrade.Core.Data.Database.Stock
public List<Model.Stock.SkuTransactionType> ByTypeCode(List<string> typeCode)
{
typeCode.RemoveAll(string.IsNullOrWhiteSpace);
string sqlWhere = @"
WHERE TypeCode IN @typeCode ";
@@ -136,6 +138,8 @@ namespace bnhtrade.Core.Data.Database.Stock
public List<Model.Stock.SkuTransactionType> ByTypeName(List<string> typeName)
{
typeName.RemoveAll(string.IsNullOrWhiteSpace);
string sqlWhere = @"
WHERE TypeName IN @typeName ";