C# - SQLClient - Simplest INSERT

后端 未结 3 1869
失恋的感觉
失恋的感觉 2021-01-05 00:11

I\'m basically trying to figure out the simplest way to perform your basic insert operation in C#.NET using the SqlClient namespace.

I\'m using SqlConnection<

3条回答
  •  悲&欢浪女
    2021-01-05 00:36

    Since you seem to be just getting started with this now is the best time to familiarize yourself with the concept of a Data Access Layer (obligatory wikipedia link). It will be very helpful for you down the road when you're apps have more interaction with the database throughout and you want to minimize code duplication. Also makes for more consistent behavior, making testing and tons of other things easier.

提交回复
热议问题