Share via


FindByPropertySpecification.DataSourceName Property

FindByPropertySpecification.DataSourceName Property

A string representing the name of the data source (DataSource.Name property) in which to search for entities.


Public DataSourceName As System.String


[C#]

public System.String DataSourceName;

Remarks

Example

[Visual Basic]

    Dim findServiceSoap As FindServiceSoap = New FindServiceSoap
    findServiceSoap.Credentials = _
        New NetworkCredential(myMapPointUserId, mySecurePassword)

    Dim entityPropertyValues As EntityPropertyValue() = New EntityPropertyValue(1) {}
    entityPropertyValues(0) = New EntityPropertyValue
    entityPropertyValues(0).Name = "PrimaryCity"
    entityPropertyValues(0).Value = "Berlin"
    entityPropertyValues(1) = New EntityPropertyValue
    entityPropertyValues(1).Name = "IsWiFiHotSpot"
    entityPropertyValues(1).Value = True
    Dim findByPropertySpecification _
        As FindByPropertySpecification = New FindByPropertySpecification
    findByPropertySpecification.DataSourceName = "MapPoint.FourthCoffeeSample"
    findByPropertySpecification.Filter = New FindFilter
    findByPropertySpecification.Filter.EntityTypeName = "FourthCoffeeShops"
    findByPropertySpecification.Filter.WhereClause = New WhereClause
    findByPropertySpecification.Filter.WhereClause.SearchProperties = entityPropertyValues
    findByPropertySpecification.Filter.WhereClause.SearchOperator = SearchOperatorFlag.And
    Dim findResults As FindResults = findServiceSoap.FindByProperty(findByPropertySpecification)



[C#]

   FindServiceSoap findService = new FindServiceSoap();
   findService.Credentials = 
    new System.Net.NetworkCredential(myMapPointUserId, mySecurePassword);

   EntityPropertyValue[] mySearchProperties = new EntityPropertyValue[2];
   mySearchProperties[0] = new EntityPropertyValue();
   mySearchProperties[0].Name = "PrimaryCity";
   mySearchProperties[0].Value = "Berlin";

   mySearchProperties[1] = new EntityPropertyValue();
   mySearchProperties[1].Name = "IsWiFiHotSpot";
   mySearchProperties[1].Value = true;


   FindByPropertySpecification findbypropspec = 
         new FindByPropertySpecification();

   findbypropspec.DataSourceName = "MapPoint.FourthCoffeeSample";
   findbypropspec.Filter = new FindFilter();
   findbypropspec.Filter.EntityTypeName = "FourthCoffeeShops";

   findbypropspec.Filter.WhereClause = new WhereClause();
   findbypropspec.Filter.WhereClause.SearchProperties = mySearchProperties;
   findbypropspec.Filter.WhereClause.SearchOperator = SearchOperatorFlag.And;

   FindResults foundResults;
   foundResults = findService.FindByProperty(findbypropspec);


See Also

  FindByPropertySpecification Class   |   FindByProperty Method