Esempio n. 1
0
        public int update(Sec_Object sec_Object)
        {
            db.Connection.Open();
            int result = db.Connection.Execute(StoreProcedureNames.Sec_Object.Update, new { Id = sec_Object.Id, Name = sec_Object.Name, Description = sec_Object.Description }, commandType: CommandType.StoredProcedure);

            db.Connection.Close();
            return(result);
        }
Esempio n. 2
0
        public int delete(Sec_Object sec_Object)
        {
            db.Connection.Open();
            int result = db.Connection.Execute(StoreProcedureNames.Sec_Object.Delete, new { Id = sec_Object.Id }, commandType: CommandType.StoredProcedure);

            db.Connection.Close();
            return(result);
        }
Esempio n. 3
0
        public ActionResult <object> Update(Sec_Object sec_Object)
        {
            AppDB         db            = provider.GetRequiredService <AppDB>();
            Sec_ObjectsDA sec_ObjectsDA = new Sec_ObjectsDA(db);
            var           res           = sec_ObjectsDA.update(sec_Object);

            return(new
            {
                result = res
            });
        }