I use the ADO.Net SqlConnection, SqlCommand and SqlDataReader for all of my database interaction within my DAL. When I do a SELECT statement I cycle through my reader in a while loop and store each row in custom objects I have created.
It seems to me like nobody uses this method anymore, I hear all these things about LINQ to SQL and the Entity Framework. Is my method still an acceptable way of database manipulation?
Sure – occasionally. For BULK operations, or when you really need to have total control over your SQL, or when using a full-blown ORM is just overkill (little apps, demos, etc.) – I still crank our
SqlConnectionandSqlDataReaderobjects at times.Also – with Micro ORM’s like Dapper-dot-net and Massive (by Rob Conery), using “straight” ADO.NET and SQL statements might make something of a comeback, too!