Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using PayCoreCustomReport.Configurations;
- using PetaPoco.NetCore;
- using System.Data.SqlClient;
- namespace PayCoreCustomReport.Service
- {
- public interface IService
- {
- }
- public class Service : IService
- {
- protected readonly Database _db;
- public Service() => _db = GetDatabase();
- protected Database DB => _db;
- protected virtual Database GetDatabase()
- {
- string connectionString
- = new StartUpConfigurations().GetConnectionStringConfiguration().Conn;
- return new Database(new SqlConnection(connectionString));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement