public bool Delete(USERP uSERP) { var userps = _userProductRepository.FindByUsertId(uSERP.Id); if (userps.Any()) { foreach (var userp in userps) { var _use = new UserProduct { Id = userp.Id }; _userProductRepository.Delete(_use); } } return(_uSERRepository.Delete(uSERP) > 0); }
public Task DeleteFromUserProduct(int userId, int productId) { return(_userProductRepository.Delete(userId, productId)); }
public bool Delete(UserProduct userProduct) { return(_userProductRepository.Delete(userProduct) > 0); }