public static bool Remove(ProviderEntity provider) { if ((provider == null) || (TransactionProvider.IsExistTop(p => p.Id == provider.Id))) { return(false); } return(DatabaseConnection.Remove <ProviderEntity>(p => p.Id == provider.Id)); }
public static bool Remove(ProductListEntity product) { ProductEntity record = ConvertToProduct(product); if ((record == null) || (TransactionProvider.IsExistBody(p => p.ProductId == product.Id))) { return(false); } return(DatabaseConnection.Remove <ProductEntity>(p => p.Id == product.Id)); }