Ancora update ART
This commit is contained in:
@@ -656,20 +656,20 @@ namespace MP.Data.Controllers
|
||||
/// Update record config
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public bool ConfigUpdate(ConfigModel updRec)
|
||||
public async Task<bool> ConfigUpdateAsync(ConfigModel updRec)
|
||||
{
|
||||
bool fatto = false;
|
||||
ConfigModel dbResult = new ConfigModel();
|
||||
using (var dbCtx = new MoonProContext(options))
|
||||
{
|
||||
dbResult = dbCtx
|
||||
dbResult = await dbCtx
|
||||
.DbSetConfig
|
||||
.Where(x => x.Chiave == updRec.Chiave)
|
||||
.FirstOrDefault();
|
||||
.FirstOrDefaultAsync();
|
||||
if (dbResult != null)
|
||||
{
|
||||
dbResult.Valore = updRec.Valore;
|
||||
dbCtx.SaveChanges();
|
||||
await dbCtx.SaveChangesAsync();
|
||||
fatto = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user