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); }
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); }
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 }); }