public async Task <ProductOptionApiModel> CreateAsync(ProductOptionApiModel option) { // Transaction is being used here just as an example (let's consider that more than one operation could happen below) this.BeginTransaction(); var newOption = await this._productOptionService.CreateAsync(option.Adapt <ProductOption>()); this.Commit(); return(newOption.Adapt <ProductOptionApiModel>()); }
public async Task RemoveAsync(ProductOptionApiModel option) { await this._productOptionService.RemoveAsync(option.Adapt <ProductOption>()); }