namespace Generator_Class_BD.Clases.NetCore._1.Controladores
{
    using Generator_Class_BD.Clases.Consultas;
    using Generator_Class_BD.Clases.NetCore._1.Controladores.Api;
    using Generator_Class_BD.Clases.Transversales.Modelo;
    using System.Data;
    using System.Globalization;
    using System.Threading;
    public class Controladores
    {
        public static void GenerarControlador(string vNombreClase, DataSet dsCol, string txtRuta, string TxtSolucion, string autor, string company)
        {
            string path = "";
            path = txtRuta + "\\1. Servicios\\" + TxtSolucion + ".API";

            CultureInfo cultureInfo = Thread.CurrentThread.CurrentCulture;
            TextInfo textInfo = cultureInfo.TextInfo;

            GenerarModels(vNombreClase, path,dsCol, TxtSolucion, autor, company);
            GenerarController(vNombreClase, path, TxtSolucion, autor, company);
        }

        private static void GenerarModels(string vNombreClase, string path, DataSet dsCol, string TxtSolucion, string autor, string company)
        {
            ClaseModelo.GenerarModelo(vNombreClase, path, dsCol, TxtSolucion, autor, company);
        }

   
        private static void GenerarController(string vNombreClase, string path, string TxtSolucion, string autor, string company)
        {
            ClaseApi.GenerarController(vNombreClase,path,TxtSolucion,autor,company);
        }

        public static void GenerarControladorConsulta(Consulta consulta, string txtRuta, string TxtSolucion, string autor, string company)
        {
            string path = "";
            path = txtRuta + "\\3. Servicios\\" + TxtSolucion + ".API";

            CultureInfo cultureInfo = Thread.CurrentThread.CurrentCulture;
            TextInfo textInfo = cultureInfo.TextInfo;

            GenerarModelsConsulta(consulta, path, TxtSolucion, autor, company);
            GenerarControllerConsulta(consulta, path, textInfo, TxtSolucion, autor, company);
         
        }

        private static void GenerarModelsConsulta(Consulta consulta, string path, string TxtSolucion, string autor, string company)
        {
            ClaseModelo.GenerarModelsConsulta( consulta,path,TxtSolucion,autor,company);
        }

        private static void GenerarControllerConsulta(Consulta consulta, string path, TextInfo textInfo, string TxtSolucion, string autor, string company)
        {
            ClaseModelo.GenerarModelsConsulta(consulta,  path,  TxtSolucion,  autor,  company);
        }

        
    }
}