public void TestPeculiarInsert() { DMLOptions Toptions = DMLExtensionsSql.SqlDefaultOptions; string channel = Guid.NewGuid().ToString(); var t1 = new PeculiarTestClass { channel = channel, index = 100 }; //default Insert is not working try { var res1 = dbc.Insert(t1); Assert.IsTrue(res1 == -1); //should not reach this code because index is a reserved word } catch (Exception ex) { Assert.IsNotNull(ex); } //should use options to use delimeters around identifiers (eg [index]) try { var res1 = dbc.Insert(t1, options: Toptions); Assert.IsTrue(res1 == -1); //should not reach this code because id is a calculated column } catch (Exception ex) { Assert.IsNotNull(ex); } var res = dbc.Insert(t1, new List <string> { "id" }, options: Toptions); Assert.AreEqual(1, res); var delete = dbc.Delete <testClass>(new { channel = channel, index = 100 }, options: Toptions); Assert.AreEqual(1, delete); }
public static List <SaveResult> insert(List <SObject> sobjects, DMLOptions DmlOptions) { return(Implementation.insert(sobjects, DmlOptions)); }
public static List <LeadConvertResult> convertLead(List <LeadConvert> leadConverts, DMLOptions DmlOptions) { return(Implementation.convertLead(leadConverts, DmlOptions)); }
public static LeadConvertResult convertLead(LeadConvert leadConvert, DMLOptions DmlOptions) { return(Implementation.convertLead(leadConvert, DmlOptions)); }
public static SaveResult update(SObject recordToUpdate, DMLOptions dmlOptions) { return(Implementation.update(recordToUpdate, dmlOptions)); }
public static SaveResult insert(SObject recordToInsert, DMLOptions dmlOptions) { return(Implementation.insert(recordToInsert, dmlOptions)); }