public List<BO.Bank> GetAllBanks() { List<BO.Bank> banks = null; using (KapitalDataContext context = new KapitalDataContext(ConnectionString)) { RepositoryAdapter<BO.Bank, Bank, BankCopyExtensions> adapter = new RepositoryAdapter<BO.Bank, Bank, BankCopyExtensions>(this); banks = adapter.GetAll(context.Banks); } return banks; }
public List<BO.User> GetUsers() { List<BO.User> users = null; using (KapitalDataContext context = new KapitalDataContext(ConnectionString)) { RepositoryAdapter<BO.User, User, UserCopyExtensions> adapter = new RepositoryAdapter<BO.User, User, UserCopyExtensions>(this); users = adapter.GetAll(context.Users); } return users; }