Exemplo n.º 1
0
        public static List <T> RunFile <T>(string fileContent, AccesType asAdmin = AccesType.StandardUser, params string[] replacements)
        {
            string     slqCommandText = string.Format(fileContent, replacements);
            SqlCommand sqlCommand     = new SqlCommand(slqCommandText);

            switch (asAdmin)
            {
            case AccesType.Admin:
                return(serviceAccessDBAdmin.SQLRunQueryProcedure <T>(sqlCommand));

            case AccesType.AdminAtMasterDB:
                return(serviceAccessDBAdminMaster.SQLRunQueryProcedure <T>(sqlCommand));

            default:
                return(serviceAccessDB.SQLRunQueryProcedure <T>(sqlCommand));
            }
        }