>
_datacontext.SubmitChanges ();
}
}
}
Загальний клас
FurnitureCatalog.Models
{class DataManager
{FurnitureModelDataContext _datacontext;
// public DataManager ()
// {
// _datacontext = new FurnitureModelDataContext ();
//}
DataManager (string connectionString)
{
_datacontext = new FurnitureModelDataContext (connectionString);
}
MembershipRepository _membershipRepository; MembershipRepository Membership
{
{(_membershipRepository == null)
_membershipRepository = new MembershipRepository (); _membershipRepository;
}
}
ItemsRepository _itemsRepository; ItemsRepository Items
{
{(_itemsRepository == null)
_itemsRepository = new ItemsRepository (_datacontext); _itemsRepository;
}
}
SellersRepository _sellersRepository; SellersRepository Sellers
{
{(_sellersRepository == null)
_sellersRepository = new SellersRepository (_datacontext); _sellersRepository;
}
}
CountriesRepository _countriesRepository; CountriesRepository Countries
{
{(_countriesRepository == null)
_countriesRepository = new CountriesRepository (_datacontext); _countriesRepository;
}
}
StatesRepository _statesRepository; StatesRepository States
{
{(_statesRepository == null)
_statesRepository = new StatesRepository (_datacontext); _statesRepository;
}
}
BusinessTypesRepository _businesstypesRepository; BusinessTypesRepository BusinessTypes
{
{(_businesstypesRepository == null)
_businesstypesRepository = new BusinessTypesRepository (_datacontext); _businesstypesRepository;
}
}
ProducersRepository _producersRepository; ProducersRepository Producers
{
{(_producersRepository == null)
_producersRepository = new ProducersRepository (_dataconte...