Example #1
0
        public int update(Allowed_Action allowed_Action)
        {
            db.Connection.Open();
            int result = db.Connection.Execute(StoreProcedureNames.Allowed_Action.Update, new { Id = allowed_Action.Id, Name = allowed_Action.Name, Description = allowed_Action.Description }, commandType: CommandType.StoredProcedure);

            db.Connection.Close();
            return(result);
        }
Example #2
0
        public int delete(Allowed_Action allowed_Action)
        {
            db.Connection.Open();
            int result = db.Connection.Execute(StoreProcedureNames.Allowed_Action.Delete, new { Id = allowed_Action.Id }, commandType: CommandType.StoredProcedure);

            db.Connection.Close();
            return(result);
        }
        public ActionResult <object> Update(Allowed_Action allowed_Action)
        {
            AppDB            db = provider.GetRequiredService <AppDB>();
            Allowed_ActionDA allowed_ActionDA = new Allowed_ActionDA(db);
            var res = allowed_ActionDA.update(allowed_Action);

            return(new
            {
                result = res
            });
        }