Filter
Exclude
Time range
-
Near
🧵 Thread: ADO.NET isn’t “old” — it’s misunderstood I used to think opening a new SqlConnection everywhere was a bug. Turns out… it’s not.
1
5
183
.NET の Object を SQL Server に対して超簡単に Bulk Insert するためのライブラリを作りました🚀 github.com/xin9le/ObjectBulk… --- これだけ!! --- using var conn = new SqlConnection(...); var count = await conn.BulkInsertAsync(records, options: default, timeout: null, cancellationToken);
1
9
54
3,999
8 Jan 2025
Küçük Bir Bilgi📌 SqlConnection sınıfı, SQL Server veritabanlarına bağlanmak için kullanılır.
10
72
Dapper is a lightweight, open-source Object-Relational Mapping (ORM) library for .NET, developed by Stack Exchange. It simplifies database interactions by allowing developers to execute SQL queries and map results directly to .NET objects with minimal boilerplate code. ### Key Features: 1. **Performance**: Dapper is designed for speed, often outperforming other ORM frameworks by executing raw SQL and minimizing overhead. 2. **Simplicity**: It provides a straightforward API that makes it easy to use, especially for developers familiar with SQL. 3. **Flexibility**: Dapper supports multiple database systems, including SQL Server, MySQL, PostgreSQL, and SQLite. 4. **Strongly Typed**: It maps query results to strongly typed objects, which enhances type safety in applications. 5. **Partial Mapping**: You can map only the properties you need, which can optimize performance and memory usage. 6. **Support for Advanced Queries**: Dapper can handle complex queries, including joins, and supports stored procedures. ### Use Cases: - When high performance is essential and the overhead of a full ORM is not justified. - In applications that require straightforward database interactions without extensive mapping configurations. ### Example: Here's a simple example of using Dapper to query a database: ```csharp using (var connection = new SqlConnection(connectionString)) { connection.Open(); var result = connection.Query<User>("SELECT * FROM Users WHERE Age > @Age", new { Age = 18 }); } ``` In this example, the `Query` method executes a SQL command and maps the results to a list of `User` objects. ### Conclusion: Dapper is an excellent choice for developers looking for a lightweight and efficient way to interact with databases in .NET applications. Its balance of performance and simplicity makes it a popular choice in many projects.

208
4
108
741
23 Feb 2024
SuperCommonBaseかっけー! さすがにsqlConnectionを取ってるのは問題だけど extension method が無い言語だと SuperCommonBase 的な実装継承させたくなるのもちょっとわかる…… default methodのある今ならinterfaceでも良さそうだけど。 IdOpsとか実は似たようなものだよね
2
2
4
1,560
ちなみにSuperCommonBase にはsqlConnection を取得する処理がコンストラクタに書いてあって、真面目に逃げることを考えた。
1
6
20
3,041
Replying to @SimonHolman
Its about scalability. Do a search for c# await SqlConnection
2
623
Auto closing SqlConnection... #dotnet #csharp #SQLServer
4
1
9
3,845
Be me: google "sqlconnection getschema calculated column" Also be me: First result on Stack Overflow is a question with an accepted answer from me
2
241
12 Apr 2023
(I assume you’re not trolling) Direct dependency on the implementation looks like this: “new SqlConnection” (or “new AmazonDynamoDBClient”, if you’re fancy) directly in your API controller.
2
2
72
4 Aug 2022
Thanks for your valuable insights @shayrojansky - interesting discussion about SqlConnection and Transient vs Scoped Dependency Injection #dotnet #sqlserver
Replying to @ErikEJ @Will_Huang
EF's DbContext and DbConnection are very different beasts; the former is stateful (e.g. change tracking) and users *may* want to share the same one across the scope.
3
3
WSL2 の Ubuntu から SqlConnection を使って Azure SQL Database に接続できない zenn.dev/karamem0/articles/2…

1
2
29 Jan 2022
Trying my best to learn all these Solana protocols and for certain it's quite challenging to understand how to connect and use a provider. It is somewhat similar to using a SqlConnection on C# 😭
5
If you’re allowed to use asp.net, C sharp has built in sqlconnection library to run the queries ez
1
17 Nov 2021
var conn = new SqlConnection(ConfigurationManager.ConnectionStrings[“ProdConnection”].ConnectionString);
1
なんか「今手元で書いてたソースがSqlConnectionまわり」だったので、タイムリー。覚えとこーっと。 .NET Core で SqlConnection の ConnectTimeout が 15未満に設定しても無視されてそう。 - お だ のスペース odashinsuke.hatenablog.com/e…

2
はてなブログに投稿しました #はてなブログ .NET Core で SqlConnection の ConnectTimeout が 15未満に設定しても無視されてそう。 - お だ のスペース odashinsuke.hatenablog.com/e…

3
C:\Windows\Users.mdf ------------------------ ثالثاً: انشاء كائن الاتصال مع القاعدة: SqlConnection con = new SqlConnection(conStr); انشئنا كائن اسمه con للاتصال مع القاعدة عن طريق نص الاتصال (رقم التلفون) ... ------------------------
1
9 Apr 2021
Replying to @SwiftOnSecurity
remind me of that one time i wiped prod and wrote a C# program using SqlConnection to restore it because i couldn't figure SQL out :)
3