mirror of
https://github.com/github/codeql.git
synced 2025-12-20 02:44:30 +01:00
20 lines
369 B
C#
20 lines
369 B
C#
using System;
|
|
using System.Data.SqlClient;
|
|
|
|
class Bad
|
|
{
|
|
public SqlDataReader GetAllCustomers()
|
|
{
|
|
var conn = new SqlConnection("connection string");
|
|
conn.Open();
|
|
|
|
var cmd = new SqlCommand("SELECT * FROM Customers", conn);
|
|
var ret = cmd.ExecuteReader();
|
|
|
|
cmd.Dispose();
|
|
conn.Dispose();
|
|
|
|
return ret;
|
|
}
|
|
}
|