I have a DataAccess class with many methods and I use code to access one of the methods
var dataAccess = new DataAccess(); var s = dataAccess.GetDailyStatistic(...);
I would like to group these methods into a non-stationary class and access them as such
var dataAccess = new DataAccess(); var s = dataAccess.Statistic.GetDaily(...);
What is the best way to achieve this? Nested classes?
The structure of the DataAccess class.
public class DataAccess : DataAccessor { public int AddUser(string orderId, string email, string userPassword, string firstName, string lastName, int membershipId, string store, string country) public void DeleteBlockedUser(string email) public void DeleteUserById(int userId) public MembershipTypes GetMembershipType(int membershipId) public MembershipTypes GetUserMembershipType(int userId) public int? GetUserId(string email) public void UpdateUserExpirationDate(string orderId) public void UpdateUserCredits(int userId, int membershipId) public List<UserEntity> LoadUser(string email, string password) public string GetUserIdFromAuthList(string url) public UserEntity LoadUserById(int id) public UserEntity LoadUserByOrderId(string orderId) public void UpdateUser(int id, string email, string password, string firstName, string lastName) public void UpdateStatistic(string id, string url, string agent, string ip, string pageTitle) public List<StatisticEntity> GetStatistic(int userId, DateTime from) public void GetDailyStatistic(int userId, int days, string url, out string[] arrLabels, out int[] arrValues, out int maxValue) public void GetWeeklyStatistic(int userId, string url, DateTime from, out string[] arrLabels, out int[] arrValues, out int maxValue) ...skip... }