예제 #1
0
        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);
        }
예제 #2
0
 public Task DeleteFromUserProduct(int userId, int productId)
 {
     return(_userProductRepository.Delete(userId, productId));
 }
예제 #3
0
 public bool Delete(UserProduct userProduct)
 {
     return(_userProductRepository.Delete(userProduct) > 0);
 }