Removed nugetSource from pipeline Removed more comments Created Static Classes for most DMO / Controller Classes Push ConfigurationManager.AppSettings to controller Align Tests with other Projects
19 lines
573 B
C#
19 lines
573 B
C#
using System.Configuration;
|
|
using System.Data;
|
|
using System.Data.SqlClient;
|
|
using System.Linq;
|
|
using System.Text;
|
|
|
|
using Dapper;
|
|
|
|
namespace Fab2ApprovalSystem.DMO;
|
|
|
|
public class SAM_DMO {
|
|
private readonly IDbConnection db = new SqlConnection(ConfigurationManager.ConnectionStrings["SAMDBConnectionString"].ConnectionString);
|
|
|
|
public int HasITARAccess(string userID) {
|
|
StringBuilder query = new("SELECT COUNT(*) FROM dbo.fnIsUserITARCompliant(@UserID) ");
|
|
return db.Query<int>(query.ToString(), new { UserID = userID }).SingleOrDefault();
|
|
}
|
|
|
|
} |