Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 public async Task Create(DriveSetting driveSetting)
 {
     await _context.DriveSettings.InsertOneAsync(driveSetting);
 }