Fluent API
Faster development thanks to the Fluent API of Umbraco Commerce.
Writing fluently
_uowProvider.Execute(uow =>
{
// Fetch the currency
var currency = _currencyService.GetCurrency(currencyId);
// Convert the currency into it's Writable form
var writableCurrency = currency.AsWritable(uow);
// Perform the write operation
writableCurrency.SetName("New Name");
// Persist the changes to the database
_currencyService.SaveCurrency(currency);
// Close the transaction
uow.Complete();
});
Last updated
Was this helpful?