コード例 #1
0
        public EmployeeContext CreateDbContext(string[] args)
        {
            var config  = ConfigurationHelpers.GetConfiguration(Directory.GetCurrentDirectory() + "\\..\\Api");
            var builder = new DbContextOptionsBuilder <EmployeeContext>();

            builder.UseSqlServer(ConfigurationHelpers.GetDbConnectionString(config));

            return(new EmployeeContext(builder.Options));
        }