public Brand CreateBrand(Brand brand) { using (var scope = new TransactionScope()) { var result = _opfcUow.BrandRepository.CreateBrand(brand); _opfcUow.Commit(); var brandSummary = new BrandSummary { BrandId = result.Id }; _opfcUow.BrandSummaryRepository.Create(brandSummary); _opfcUow.Commit(); scope.Complete(); return(result); } }
public void Update(BrandSummary brandSummary) { _opfcUow.BrandSummaryRepository.Update(brandSummary); _opfcUow.Commit(); }