コード例 #1
0
 /// <summary>
 /// Updates the AuditableProduct object specified by the product input parameter in the data source.
 /// </summary>
 /// <param name="product">The AuditableProduct object to update in the data source.</param>
 /// <returns>A SetDataOperationResult object containing details relating to whether the operation was successful or not.</returns>
 public SetDataOperationResult UpdateProduct(AuditableProduct product)
 {
     return(DataOperationManager.TrySet(() => DataProvider.UpdateProduct(UpdateDataModel(product)), $"{product.Name} was saved in the data source successfully.", $"A problem occurred and {product.Name} was not updated in the data source.", false, false));
 }
コード例 #2
0
 /// <summary>
 /// Adds the AuditableProduct object specified by the product input parameter to the data source and updates its Id property asynchronously.
 /// </summary>
 /// <param name="product">The AuditableProduct object to add to the data source.</param>
 public Task <SetDataOperationResult> AddProductAsync(AuditableProduct product)
 {
     return(DataOperationManager.TrySetAsync(() => DataProvider.AddProduct(InitializeDataModel(product)), $"{product.Name} was added to the data source successfully", $"A problem occurred and {product.Name} was not added to the data source."));
 }
コード例 #3
0
 /// <summary>
 /// Updates the AuditableProduct object specified by the product input parameter in the data source.
 /// </summary>
 /// <param name="product">The AuditableProduct object to update in the data source.</param>
 public void UpdateProduct(AuditableProduct product)
 {
 }
コード例 #4
0
 /// <summary>
 /// Deletes the AuditableProduct object specified by the product input parameter from the data source asynchronously.
 /// </summary>
 /// <param name="product">The AuditableProduct object to remove from the data source.</param>
 /// <returns>A SetDataOperationResult object containing details relating to whether the operation was successful or not.</returns>
 public Task <SetDataOperationResult> DeleteProductAsync(AuditableProduct product)
 {
     return(DataOperationManager.TrySetAsync(() => DataProvider.DeleteProduct(DeleteDataModel(product)), $"{product.Name} has been deleted from the data source successfully.", $"A problem occurred and {product.Name} was not deleted from the data source.", true, false));
 }
コード例 #5
0
 /// <summary>
 /// Deletes the AuditableProduct object specified by the product input parameter from the data source.
 /// </summary>
 /// <param name="product">The AuditableProduct object to remove from the data source.</param>
 public void DeleteProduct(AuditableProduct product)
 {
 }
コード例 #6
0
 /// <summary>
 /// Adds the AuditableProduct object specified by the product input parameter to the data source and updates its Id property.
 /// </summary>
 /// <param name="product">The AuditableProduct object to add to the data source.</param>
 public void AddProduct(AuditableProduct product)
 {
 }
コード例 #7
0
 /// <summary>
 /// Updates the AuditableProduct object specified by the product input parameter in the data source.
 /// </summary>
 /// <param name="product">The AuditableProduct object to update in the data source.</param>
 public void UpdateProduct(AuditableProduct user)
 {
 }
コード例 #8
0
 /// <summary>
 /// Deletes the AuditableProduct object specified by the product input parameter from the data source.
 /// </summary>
 /// <param name="product">The AuditableProduct object to remove from the data source.</param>
 public void DeleteProduct(AuditableProduct user)
 {
 }
コード例 #9
0
 /// <summary>
 /// Adds the AuditableProduct object specified by the product input parameter to the data source and updates its Id property.
 /// </summary>
 /// <param name="product">The AuditableProduct object to add to the data source.</param>
 public void AddProduct(AuditableProduct user)
 {
 }