I have an MVC-Razor project, and I am obligated to make it without employing ORM. I use only SQL commands, and in the add(model) method for the DB controller I execute a query string command in this format:
string queryString =
"INSERT INTO USERS VALUES(@EMAIL,@PAIS,@IDIOMA,@CODPROMO,@NOMBREUSU"+
",@PASS,@PIN,@TRATAMIENTO,@NOMBREPERS,@APELLIDOS,@FECHANAC,@DIRECCION,@NUMPISO"+
",@CP,@CIUDAD,@NIF,@NUMMOVIL,@SUBSCRIBIR,@CONDICIONES,@PRIVACIDAD)";
As you can see there are a lot of parameters to insert in the table. Then, I have to link those @parameters with command.Parameters.AddWithValue("@EMAIL",socio.Mail);
Is there any faster way to do all of this (something more dynamic, perhaps?) without all of that writing?