Exemple #1
0
        public bool UpdateInvestmentTrust(string NO, string NAME, string IDNO)
        {
            string SQL = "UPDATE AMD..tblInvestmentTrust SET NAME = @NAME, IDNO = @IDNO WHERE NO = @NO";
            var    p   = new DynamicParameters();

            p.Add("@NO", NO);
            p.Add("@NAME", NAME);
            p.Add("@IDNO", IDNO);

            ISqlHelper sqlHelper = SQLHelper.GetInstance("Dapper", Configurations.AMDConnectionString);

            sqlHelper.Open();
            bool result = sqlHelper.Execute(SQL, 1, (dynamic)p);

            sqlHelper.Close();

            return(result);
        }
Exemple #2
0
        public void Delete(TPrimaryKey id)
        {
            var sql = $"delete from {tableName} where Id = @Id";

            _sqlHelper.Execute(_unitOfWork.Connection, sql, new { Id = id });
        }