예제 #1
0
 /// <summary>
 ///  Insert dataset name
 /// </summary>
 /// <param name="name">Name of the dataset</param>
 /// <param name="cancellationToken">Cancelation token</param>
 /// <returns>Primary id of the inserted dataset</returns>
 /// <exception cref="ConflictException">Dataset with the given name is already in the table</exception>
 public async Task <int> InsertDataSetNameAsync(string name, CancellationToken cancellationToken)
 {
     try
     {
         return(await fDatasetRepository.InsertDatasetAsync(name, cancellationToken));
     }
     catch (DbUpdateException)
     {
         throw new ConflictException(name);
     }
 }