c# (wcf) architecture file and directory structure (and instantiation)
Posted
by stevenrosscampbell
on Stack Overflow
See other posts from Stack Overflow
or by stevenrosscampbell
Published on 2009-05-04T19:15:42Z
Indexed on
2010/03/19
23:01 UTC
Read the original article
Hit count: 459
Hello and thanks for any assistance.
I have a wcf service that I'm trying to properly modularize.
I'm interested in finding out if there is a better way or implementing the file and directory structure along with instanciatation, is there a more appropriate way of abstraction that I may be missing?
Is this the best approach? especially if performance and the ability to handle thousands of simultanious request?
Currently I have this following structure:
-Root\Service.cs
public class Service : IService { public void CreateCustomer(Customer customer) { CustomerService customerService = new CustomerService(); customerService.Create(customer); }public void UpdateCustomer(Customer customer) { CustomerService customerService = new CustomerService(); customerService.Update(customer); }
}
-Root\Customer\CustomerService.cs
pulbic class CustomerService { public void Create(Customer customer) { //DO SOMETHING }public void Update(Customer customer) { //DO SOMETHING } public void Delete(int customerId) { //DO SOMETHING } public Customer Retrieve(int customerId) { //DO SOMETHING }
}
Note: I do not include the Customer Object or the DataAccess libraries in this example as I am only concerned about the service.
If you could either let me know what you think, if you know a better way, or a resource that could help out.
Thanks Kindly. Steven
© Stack Overflow or respective owner