public Program() { m_service = new MockCrmService(); // test data for simple fetch Entity de = new Entity(); de.LogicalName = "mydynamic"; de["prop1"] = "foo"; Guid deID = m_service.Create( de ); // test data for filters de = new Entity(); de.LogicalName = "contact"; de[ "address1_name" ] = "Dan"; de[ "address1_city" ] = "Bethesda"; Guid deID2 = m_service.Create( de ); // data for testing links Guid guid = Guid.NewGuid(); de = new Entity(); de.LogicalName = "subject"; de[ "subjectid" ] = guid; Guid deID3 = m_service.Create( de ); de = new Entity(); de.LogicalName = "subject"; de[ "subjectid" ] = guid; de[ "title" ] = "child"; de[ "parentsubject" ] = new EntityReference( "subject", deID3 ); Guid deID4 = m_service.Create( de ); }
public Program() { m_service = new MockCrmService(); // test data for simple fetch Entity de = new Entity(); de.LogicalName = "mydynamic"; de["prop1"] = "foo"; Guid deID = m_service.Create(de); // test data for filters de = new Entity(); de.LogicalName = "contact"; de["address1_name"] = "Dan"; de["address1_city"] = "Bethesda"; Guid deID2 = m_service.Create(de); // data for testing links Guid guid = Guid.NewGuid(); de = new Entity(); de.LogicalName = "subject"; de["subjectid"] = guid; Guid deID3 = m_service.Create(de); de = new Entity(); de.LogicalName = "subject"; de["subjectid"] = guid; de["title"] = "child"; de["parentsubject"] = new EntityReference("subject", deID3); Guid deID4 = m_service.Create(de); }
public Program() { m_service = new MockCrmService(); contact contact = new contact(); contact.address1_name = "Dan"; contact.address1_city = "Bethesda"; Guid id = m_service.Create(contact); // data for testing links subject subject1 = new subject(); subject1.title = "parent"; Guid subject1ID = m_service.Create(subject1); subject subject2 = new subject(); subject2.title = "child"; subject2.parentsubject = new Lookup("subject", subject1ID); m_service.Create(subject2); DynamicEntity de = new DynamicEntity(); de.Name = "mydynamic"; de.Properties.Add(new StringProperty("prop1", "foo")); Guid deID = m_service.Create(de); }
static Service() { string file = System.Configuration.ConfigurationSettings.AppSettings.Get( "datafile" ); if( file != null ) { m_service = new MockCrmService( file, true ); } else { m_service = new MockCrmService(); } }
public Program() { m_service = new MockCrmService(); contact contact = new contact(); contact.address1_name = "Dan"; contact.address1_city = "Bethesda"; Guid id = m_service.Create( contact ); // data for testing links subject subject1 = new subject(); subject1.title = "parent"; Guid subject1ID = m_service.Create( subject1 ); subject subject2 = new subject(); subject2.title = "child"; subject2.parentsubject = new Lookup( "subject", subject1ID ); m_service.Create( subject2 ); DynamicEntity de = new DynamicEntity(); de.Name = "mydynamic"; de.Properties.Add( new StringProperty( "prop1", "foo" ) ); Guid deID = m_service.Create( de ); }