I already have a multi-level data access design that works well. But I do not know if this is the most suitable implementation or not.
I just want to know that the BLL or metaphoto classes should be static or should they be consistent classes that have only one instance?
At the same time, I do not need to serialize BLL classes to use it in such an SOA design. But I do not know what this function will bring.
Look at the following options:
- The BLL classes and metaphots are static.
- BLL classes are not static, but its metaphors are static.
- BLL classes are not static, nor are they its metaphors. An application must create a BLL class each time to access its snapshots.
- BLL classes are not static, nor are they its metaphors. But there is only one instance of each BLL class. And the application uses these static inorder instances to use BLL metadata.
Which one is most effective in performance and design?
EDIT:
Option1
public static class BllCustomer { public static List<ModelCustomer> GetCustomers() { } }
Option2
public class BllCustomer { public static List<ModelCustomer> GetCustomers() { } }
Option 3
public class BllCustomer { public List<ModelCustomer> GetCustomers() { } }
OPTION4
public class BllCustomer { public List<ModelCustomer> GetCustomer() { } }
source share