public void removeManager(Manager manager) { lock (this) { try { Prem.RemoveRange(manager.store_permission); managers.Remove(manager); SaveChanges(); } catch (Exception e) { } } }
internal void tearDown() { try { dataUsers.RemoveRange(dataUsers.ToList()); adminUsers.RemoveRange(adminUsers.ToList()); states.RemoveRange(states.ToList()); statistics.RemoveRange(statistics.ToList()); productInCarts.RemoveRange(productInCarts.ToList()); membersShoppingBaskets.RemoveRange(membersShoppingBaskets.ToList()); membersShoppingCarts.RemoveRange(membersShoppingCarts.ToList()); appointers.RemoveRange(appointers.ToList()); Prem.RemoveRange(Prem.ToList()); managers.RemoveRange(managers.ToList()); products.RemoveRange(products.ToList()); addresses.RemoveRange(addresses.ToList()); BidsManager.RemoveRange(BidsManager.ToList()); transactionStatuses.RemoveRange(transactionStatuses.ToList()); deliveryStatuses.RemoveRange(deliveryStatuses.ToList()); purchasedProducts.RemoveRange(purchasedProducts.ToList()); productHistoryDatas.RemoveRange(productHistoryDatas.ToList()); paymentStatuses.RemoveRange(paymentStatuses.ToList()); stores.RemoveRange(stores.ToList()); PurchasePolicy.RemoveRange(PurchasePolicy.ToList()); categories.RemoveRange(categories.ToList()); marketRulesRequestType1.RemoveRange(marketRulesRequestType1.ToList()); marketRulesRequestType2.RemoveRange(marketRulesRequestType2.ToList()); marketRulesRequestType3.RemoveRange(marketRulesRequestType3.ToList()); marketRulesRequestType4.RemoveRange(marketRulesRequestType4.ToList()); marketRulesRequestType5.RemoveRange(marketRulesRequestType5.ToList()); marketRulesRequestType6.RemoveRange(marketRulesRequestType6.ToList()); marketRulesRequestType7.RemoveRange(marketRulesRequestType7.ToList()); marketRulesRequestType8.RemoveRange(marketRulesRequestType8.ToList()); SaveChanges(); } catch (Exception e) { } }