static void Main(string[] args) { //string connectionString = ConfigurationManager.ConnectionStrings["PhoneTariffConnectionString"].ConnectionString; //IDatabase database = new Database(connectionString); //ITariffDao tariffDao = new TariffDao(database); IDatabase database = DALFactory.CreateDatabase(); ITariffDao tariffDao = DALFactory.CreateTariffDao(database); var tariff = tariffDao.FindById("A1"); Console.WriteLine(tariff.BasicFee); Console.ReadKey(); }
public TariffProvider(ITariffDao rateDao) { _rateDao = rateDao; }
public override ICollection <Tariff> GetAllTariffs() { ITariffDao dao = DalFactory.CreateTariffDao(database); return(dao.FindAll()); }
public TariffsService(ITariffDao dao, ICommandBus commandBus) { _commandBus = commandBus; _dao = dao; }