- enterprisedlinq_demo_vsbeta2.zip
- EnterpriseDlinq_demo_VSBeta2
- BusinessLayer
- DataAccessLayer
- MVPWeb
- App_Code
- App_Data
- Bin
- Northwind.Business.dll
- Northwind.Business.pdb
- Northwind.Data.dll
- Northwind.Data.DTO.dll
- Northwind.Data.DTO.pdb
- Northwind.Data.pdb
- Northwind.Presentation.dll
- Northwind.Presentation.pdb
- Northwind.Service.dll
- Northwind.Service.pdb
- CustomerListing.aspx
- CustomerListing.aspx.cs
- Images
- first.gif
- last.gif
- next.gif
- prev.gif
- Thumbs.db
- web.config
- NWClient.sln
- PrecompiledWeb
- MVPWeb
- bin
- App_Code.compiled
- App_Code.dll
- App_Web_jhhzcwwg.dll
- Northwind.Business.dll
- Northwind.Business.pdb
- Northwind.Data.dll
- Northwind.Data.DTO.dll
- Northwind.Data.DTO.pdb
- Northwind.Data.pdb
- Northwind.Presentation.dll
- Northwind.Presentation.pdb
- Northwind.Service.dll
- Northwind.Service.pdb
- CustomerListing.aspx
- Images
- first.gif
- last.gif
- next.gif
- prev.gif
- PrecompiledApp.config
- web.config
- Web
- Presentation
- ServiceLayer
- Thumbs.db
- TransferObjects
- Web
- enterprisedlinq_demo.zip
- EnterpriseDlinq_demo
- BusinessLayer
- DataAccessLayer
- MVPWeb
- App_Code
- App_Data
- Bin
- Northwind.Business.dll
- Northwind.Business.pdb
- Northwind.Data.dll
- Northwind.Data.DTO.dll
- Northwind.Data.DTO.pdb
- Northwind.Data.pdb
- Northwind.Presentation.dll
- Northwind.Presentation.pdb
- Northwind.Service.dll
- Northwind.Service.pdb
- CustomerListing.aspx
- CustomerListing.aspx.cs
- Images
- first.gif
- last.gif
- next.gif
- prev.gif
- Thumbs.db
- web.config
- NWClient.sln
- Presentation
- ServiceLayer
- Thumbs.db
- TransferObjects
- Web
- enterprisedlinq_dbscripts.zip
- EnterpriseDlinq_DBScripts
- enterprisedlinq_test.zip
- EnterpriseDlinq_test
- enterprisedlinq_stats.zip
- Performance Stats.xls
|
using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using Northwind.Business;
using Northwind.Business.DataInterfaces;
using Northwind.Data.DTO;
namespace Northwind.Service
{
/// <summary>
/// This service implements and encapsulates operations on the customer
/// entity. Presenters use the service to perform operations on the entity.
/// </summary>
/// <remarks>
/// Since the use case addressed by this service involves data operations,
/// the service is essentially a proxy over the business object and exposes
/// only a CRUD interface for Customers.
/// </remarks>
public class CustomerService : ICustomerService
{
private CustomerBO _bo;
public CustomerService(IDaoFactory daoFactory)
{
_bo = new CustomerBO(daoFactory);
}
#region ICustomerService Members
public IEnumerable<Customer> GetAllCustomers()
{
return _bo.GetAllCustomers();
}
public IEnumerable<Customer> GetCustomersByPage(int startRowIndex, int pageSize)
{
return _bo.GetCustomersByPage(startRowIndex, pageSize);
}
public IEnumerable<Customer> GetCustomersByPage(int startRowIndex,
int pageSize, string sortParam)
{
return _bo.GetCustomersByPage(startRowIndex, pageSize, sortParam);
}
public int GetCustomersCount()
{
return _bo.GetCustomersCount();
}
public Customer GetCustomer(string id)
{
return _bo.GetCustomer(id);
}
public IEnumerable<Customer> GetCustomerEnumerable(string id)
{
return _bo.GetCustomerEnumerable(id);
}
public void UpdateCustomer(Customer custData)
{
_bo.UpdateCustomer(custData);
}
public void UpdateCustomer(Customer custData, Customer oldCust)
{
_bo.UpdateCustomer(custData, oldCust);
}
public string InsertCustomer(Customer cust)
{
return _bo.InsertCustomer(cust);
}
#endregion
}
}
|
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.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
I am a tech lead working for Cap Gemini. Although I primarily work with the Microsoft technology stack (including .NET and legacy technologies) I like to keep myself informed about developments in the Java world.