/// <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)); }
/// <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.")); }
/// <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) { }
/// <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)); }
/// <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) { }
/// <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) { }
/// <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) { }
/// <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) { }
/// <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) { }