Newer
Older
BRServer / BRServer.DALFactory / BR.cs
root on 12 Mar 2019 638 bytes first commit
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;

namespace BRServer.DALFactory
{
    public class BR
    {
        public static BRServer.IDAL.IBR Create()
        {
            // Look up the DAL implementation we should be using
            string path = System.Configuration.ConfigurationManager.AppSettings["mysqlDAL"];
            string className = path + ".BR";

            // Using the evidence given in the config file load the appropriate assembly and class
            return (BRServer.IDAL.IBR)Assembly.Load(path).CreateInstance(className);
        }
    }
}