Adapter

This is working with the adapter raw to View, Add, Edit, Delete records

***********UPDATING AN ADAPTER RECORD ***************


	    EngineAdapter ad = EngineAdapter.Create("Contacts","Counselors"); 
            ad.AddResultField("HideOnline");
	   // or ad.AddResultFields(new[] {"FieldsHere"})
            
            EngineRecord counselor = ad.GetRecord(Convert.ToInt32(Request.UrlSegments[0]));
            counselor["HideOnline"] = true;
            counselor.Update();




**************Inserting AN ADAPTER RECORD****************


EngineAdapter ad = EngineAdapter.Create("Content","NomineeReferences"); 
                ad.AddResultFields(new[] {"PastorName", "Email", "Nominee"});
                EngineRecord refp = ad.CreateNewRecord();
                refp["PastorName"] = req.GetString("Pastor");
                refp["Email"] = req.GetString("PastorEmail");
                refp["Nominee"] = new[] {Convert.ToInt32(Request.UrlSegments[0])};
                refp.Insert();
            
ADD CATEGORY VALUE IN ADAPTER**********


s["ClergyStatus"]= new CategoryFieldValue(new[] {cs.Value});


CHECK IF RECORD EXISTS
bool doesExists = ad.RecordsExist()