Click here to Skip to main content
15,897,718 members
Articles / Programming Languages / C# 4.0

INCLUDE in classic ADO.NET

Rate me:
Please Sign up or sign in to vote.
4.91/5 (4 votes)
5 Jul 2012CPOL3 min read 21.4K   641   12  
Implementing and using an INCLUDE method in classic ADO.NET.
using EncodeFirst.TestService.BusinessObjects.Types.Filters;
using EncodeFirst.TestService.BusinessObjects.Types.DataModel;

namespace EncodeFirst.TestService.BusinessObjects.Contracts
{
    public interface ICustomerRepository
    {
        /// <summary>
        /// Gets the customer.
        /// </summary>
        /// <param name="customerId">The customer id.</param>
        /// <returns></returns>
        /// <remarks></remarks>
        Customer GetCustomer(long customerId);

        /// <summary>
        /// Gets customer by name.
        /// </summary>
        /// <param name="name">The name of the Customer.</param>
        /// <returns></returns>
        /// <remarks></remarks>
        Customer GetCustomerByName(string name);

        /// <summary>
        /// Gets the customers list.
        /// </summary>
        /// <returns></returns>
        /// <remarks></remarks>
        Customer[] GetCustomersList();

        /// <summary>
        /// Gets the customers list by filter.
        /// </summary>
        /// <param name="filter">The filter.</param>
        /// <param name="totalRows">The total rows.</param>
        /// <returns></returns>
        /// <remarks></remarks>
        Customer[] GetCustomersListByFilter(CustomerFilter filter, out int totalRows);

        /// <summary>
        /// Inserts the specified customer.
        /// </summary>
        /// <param name="customer">The customer.</param>
        /// <returns></returns>
        /// <remarks></remarks>
        bool Insert(Customer customer);

        /// <summary>
        /// Updates the specified customer.
        /// </summary>
        /// <param name="customer">The customer.</param>
        /// <returns></returns>
        /// <remarks></remarks>
        bool Update(Customer customer);

        /// <summary>
        /// Deletes the specified customer id.
        /// </summary>
        /// <param name="customerId">The customer id.</param>
        /// <returns></returns>
        /// <remarks></remarks>
        bool Delete(long id);

        /// <summary>
        /// Deletes the specified customer ids.
        /// </summary>
        /// <param name="customerIds">The customer ids.</param>
        /// <returns></returns>
        /// <remarks></remarks>
        bool Delete(long[] ids);
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions