public void DownloadBrands() { var brandResponse = api.getBrands(); using (CatalogDataContext dc = new CatalogDataContext()) { foreach (Brand brand in brandResponse.getBrands()) { SS_Brand ssBrand = new SS_Brand() { id = System.Guid.NewGuid(), brand_id = brand.getId(), brand_name = brand.getName(), url = brand.getUrl() }; dc.SS_Brands.InsertOnSubmit(ssBrand); } dc.SubmitChanges(); } }
partial void UpdateSS_Brand(SS_Brand instance);
partial void DeleteSS_Brand(SS_Brand instance);
partial void InsertSS_Brand(SS_Brand instance);