A .NET Core wrapper for the WooCommerce REST API. Easily interact with the WooCommerce REST API from .NET Core securely using this library, note that it only supports https (BasicAuth.)
WooCommerceCore.NET - .NET Standard 1.6 | .NET Core 1.0 | .NET 4.6.1
All repositories inherit from IRepository interface:
public interface IRepository<T>
where T : IEntity
{
Task<T> CreateAsync(T entity);
Task<T> DeleteAsync(T entity);
Task<IList<T>> ListAsync();
Task<T> RetrieveAsync(int id);
Task<T> UpdateAsync(T entity);
}
var product = await _productRepository.CreateAsync(new Product
{
Name = "test-product",
CatalogVisibility = "visible"
});
var product = await _productRepository.DeleteAsync(product);
var products = await _productRepository.ListAsync();
var product = await _productRepository.RetrieveAsync(1);
var alteredProduct = await _productRepository.UpdateAsync(product);