Ricerca cartellini (fixed)
This commit is contained in:
@@ -34,19 +34,21 @@ namespace MP.AppAuth.Controllers
|
||||
public List<Models.AnagraficaOperatori> AnagOpGetAll(string searchVal)
|
||||
{
|
||||
List<Models.AnagraficaOperatori> dbResult = new List<Models.AnagraficaOperatori>();
|
||||
|
||||
if (!string.IsNullOrEmpty(searchVal))
|
||||
using (AppAuthContext localDbCtx = new AppAuthContext(_configuration))
|
||||
{
|
||||
dbResult = dbCtx
|
||||
.DbSetAnagOpr
|
||||
.Where(x => x.Cognome.Contains(searchVal) || x.Nome.Contains(searchVal))
|
||||
.ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
dbResult = dbCtx
|
||||
.DbSetAnagOpr
|
||||
.ToList();
|
||||
if (!string.IsNullOrEmpty(searchVal))
|
||||
{
|
||||
dbResult = localDbCtx
|
||||
.DbSetAnagOpr
|
||||
.Where(x => x.Cognome.Contains(searchVal) || x.Nome.Contains(searchVal))
|
||||
.ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
dbResult = localDbCtx
|
||||
.DbSetAnagOpr
|
||||
.ToList();
|
||||
}
|
||||
}
|
||||
// ritorno
|
||||
return dbResult;
|
||||
@@ -93,11 +95,12 @@ namespace MP.AppAuth.Controllers
|
||||
public List<Models.UpdMan> UpdManGetAll()
|
||||
{
|
||||
List<Models.UpdMan> dbResult = new List<Models.UpdMan>();
|
||||
|
||||
dbResult = dbCtx
|
||||
using (AppAuthContext localDbCtx = new AppAuthContext(_configuration))
|
||||
{
|
||||
dbResult = localDbCtx
|
||||
.DbSetUpdMan
|
||||
.ToList();
|
||||
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
@@ -108,11 +111,12 @@ namespace MP.AppAuth.Controllers
|
||||
public List<Models.Vocabolario> VocabolarioGetAll()
|
||||
{
|
||||
List<Models.Vocabolario> dbResult = new List<Models.Vocabolario>();
|
||||
|
||||
dbResult = dbCtx
|
||||
using (AppAuthContext localDbCtx = new AppAuthContext(_configuration))
|
||||
{
|
||||
dbResult = localDbCtx
|
||||
.DbSetVocabolario
|
||||
.ToList();
|
||||
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user