This commit is contained in:
tanglong 2025-07-25 10:09:21 +08:00
parent 55e1246e83
commit 83b0a0b271

View File

@ -174,12 +174,8 @@ namespace YD_AllHeartRates.Api.Services.Impl
await _sportsContext.AddAsync(entity);
var res = await _sportsContext.SaveChangesAsync() > 0;
if (res)
{
_caching.Remove(AppSettings.DeviceListCacheKey);
return true;
}
return false;
return res;
}
/// <summary>
@ -210,12 +206,8 @@ namespace YD_AllHeartRates.Api.Services.Impl
_sportsContext.Update(device);
var res = await _sportsContext.SaveChangesAsync() > 0;
if (res)
{
_caching.Remove(AppSettings.DeviceListCacheKey);
return true;
}
return false;
return res;
}
/// <summary>
@ -233,12 +225,8 @@ namespace YD_AllHeartRates.Api.Services.Impl
_sportsContext.Device.Remove(device);
var res = await _sportsContext.SaveChangesAsync() > 0;
if (res)
{
_caching.Remove(AppSettings.DeviceListCacheKey);
return true;
}
return false;
return res;
}
/// <summary>