public ActionResult <object> Put(Citizens citizen) { DALOps dal = new DALOps(connStr, database); Dictionary <object, object> pairs = new Dictionary <object, object>(); pairs.Add("citizenid", citizen.citizenid); #if DALChanges1 var dotNetObj = dal.UpdateCollection(collection, citizen, pairs); #else var dotNetObj = dal.UpdateCollection(dal, collection, citizen); #endif return(dotNetObj); }
//[Route("api/[controller]/Put")] public IActionResult Put([FromBody] Persons person, string personid) { DALOps dal = new DALOps(connStr, database); Dictionary <object, object> pairs = new Dictionary <object, object>(); pairs.Add("personid", personid); var dotNetObj = dal.UpdateCollection(dal, collection, person, pairs); return(Ok(dotNetObj)); }