Best C# database communication technique
- by user65439
A few days ago I read a reply to a question where people said that the days of writing queries within your c# code are long gone.
I'm not sure what the specific person meant with the comment but it got me thinking. At the company I'm currently working at we maintain an assembly containing all the queries to the database (let's call it Queries), this assembly is reference by a QueryService (Retrieve the correct queries) assembly which in turn is referenced by a UnitOfWork assembly (The database connector classes, we have different connector classes for SQL, MySQL etc.). We use these three assemblies to perform operations on our database and all queries/commands are written in our C# code.
Is there a better way to communicate with the database and is there a better way to communicate with different database types?