fix controllo variabili passate metodo listvalues
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Microsoft.Data.SqlClient;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Internal;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using NLog;
|
||||
using System.Data;
|
||||
@@ -507,12 +508,32 @@ namespace WebDoorCreator.Data.Controllers
|
||||
{
|
||||
try
|
||||
{
|
||||
// extracting entire set
|
||||
dbResult = localDbCtx
|
||||
.DbSetValues
|
||||
.Where(x => (x.TableName == tableName || x.TableName.Contains(tableName)) && (x.FieldName == fieldName))
|
||||
.OrderBy(x => x.Ordinal)
|
||||
.ToList();
|
||||
if (tableName != "*" && fieldName != "*")
|
||||
{
|
||||
|
||||
// extracting entire set
|
||||
dbResult = localDbCtx
|
||||
.DbSetValues
|
||||
.Where(x => (x.TableName == tableName) && (x.FieldName == fieldName))
|
||||
.OrderBy(x => x.Ordinal)
|
||||
.ToList();
|
||||
}
|
||||
else if(tableName == "*" && fieldName != "*")
|
||||
{
|
||||
dbResult = localDbCtx
|
||||
.DbSetValues
|
||||
.Where(x => (x.FieldName == fieldName))
|
||||
.OrderBy(x => x.Ordinal)
|
||||
.ToList();
|
||||
}
|
||||
else if (tableName != "*" && fieldName == "*")
|
||||
{
|
||||
dbResult = localDbCtx
|
||||
.DbSetValues
|
||||
.Where(x => (x.TableName == tableName))
|
||||
.OrderBy(x => x.Ordinal)
|
||||
.ToList();
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
@@ -554,7 +575,7 @@ namespace WebDoorCreator.Data.Controllers
|
||||
|
||||
fatto = true;
|
||||
|
||||
|
||||
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
|
||||
Reference in New Issue
Block a user