public void RemoveContact(Contact entity, Int32 customerId, Int32 companyId) { var ccManager = new CustomerContactManager(this); var cc = new CustomerContact(); cc.ContactId = entity.ContactId; cc.CustomerId = customerId; ccManager.Delete(cc); var contactManager = new ContactManager(this); contactManager.Delete(entity); }
/// <summary> /// Basic Delete Method /// </summary> /// <param name="entity"></param> /// <param name="supplierId"></param> /// <param name="companyId"></param> public void RemoveContact(Contact entity, Int32 supplierId, Int32 companyId) { var scManager = new SuppliersContactManager(this); var sc = new SupplierContact { SupplierId = supplierId, ContactId = entity.ContactId }; scManager.Delete(sc); var contactManager = new ContactManager(this); contactManager.Delete(entity); }