public async Task <bool> Update(DriveSetting driveSetting) { ReplaceOneResult updateResult = await _context .DriveSettings .ReplaceOneAsync( filter : g => g.DriveName == driveSetting.DriveName, replacement : driveSetting); return(updateResult.IsAcknowledged && updateResult.ModifiedCount > 0); }
public async Task Create(DriveSetting driveSetting) { await _context.DriveSettings.InsertOneAsync(driveSetting); }