1. Question: Against which of the following classes can you write a LINQ query? (Choose all that apply).

    A
    DataSet

    B
    List<T>

    C
    Array

    D
    Dictionary<TKey, TValue)

    Note: Not available
    1. Report
  2. Question: You need to write a LINQ query to retrieve a list of state hospitals. The results should be sorted and grouped first by county. For each county, the hospitals should be sorted by city. Which of the following LINQ queries would you write? (Choose all that apply.)

    A
    Visual Basic Code
    Dim hsQ = From hspt In hospitals
    Order By hspt.County, hspt.City
    Group hspt By hspt.County Into hsptGroup = Group
    C# Code
    var hsQ = from hspt in hospitals
    orderby hspt.County, hspt.City
    group hspt by hspt.County;

    B
    Visual Basic Code
    Dim hsQ = From hspt In hospitals
    Order By hspt.County
    Group hspt By hspt.County Into hsptGroup = Group
    Order By hsptGroup.Last.City
    C# Code
    var hsQ = from hspt in hospitals
    orderby hspt.County
    group hspt by hspt.County into hsptGroup
    orderby hsptGroup.Last().City
    select hsptGroup;

    C
    Visual Basic Code
    Dim hsQ = From hspt In hospitals
    Order By hspt.County, hspt.City
    Group hspt By hspt.County Into hsptGroup = Group
    Order By hsptGroup.First.County
    C# Code
    var hsQ = from hspt in hospitals
    orderby hspt.County
    group hspt by hspt.County into hsptGroup
    orderby hsptGroup.Key
    select hsptGroup;

    D
    Visual Basic Code
    Dim hsQ = From hspt In hospitals
    Order By hspt.City
    Group hspt By hspt.County Into hsptGroup = Group
    Order By hsptGroup.First.County
    C# Code
    var hsQ = from hspt in hospitals
    orderby hspt.City
    group hspt by hspt.County into hsptGroup
    orderby hsptGroup.First().County
    select hsptGroup;

    Note: Not available
    1. Report
  3. Question: You want to merge the results from two separate LINQ queries into a single result set. How would you accomplish this?

    A
    Use the ToList method.

    B
    Use the DataContractJsonSerializer class.

    C
    Use the XElement class.

    D
    Use the Concat method.

    Note: Not available
    1. Report
  4. Question: You need to write a where clause in a LINQ query against a strongly typed DataSet of universities (from u in universities). The where clause should select all universities with more than 10,000 enrolled students. Which where clause would you write?

    A
    where u.Field("EnrolledStudents") > 10000

    B
    where u.EnrolledStudents > 10000

    C
    C#: where u[“EnrolledStudents”] > 10000Visual Basic: where u(“EnrolledStudents”) > 10000

    D
    where university.Fields.EnrolledStudents > 10000

    Note: Not available
    1. Report
  5. Question: Which of the following objects represents a LINQ to SQL O/R map?

    A
    DataSet

    B
    XElement

    C
    ObjectContext

    D
    DataContext

    Note: Not available
    1. Report
  6. Question: You are using an Entity Data Model object. Which of the following lines of code will initialize this object and connect to the associated database? (Choose all that apply.)

    A
    MyModel.myEntities model = new MyModel.myEntitites()

    B
    MyModel.myEntities model = new MyModel.myEntitites(cnnString)

    C
    PubsModel.pubsEntities pubs = new PubsModel.pubsEntities(new System.Data.EntityClient.EntityConnection(cnnString))

    D
    MyModel.myEntities model = new MyModel.myEntitites( new DataContext(cnnString))

    Note: Not available
    1. Report
  7. Question: You have a data context map for your SQL Server database defined inside a class file. You need to connect to this data by using a data source control. Which data source control should you use?

    A
    ObjectDataSource

    B
    SqlDataSource

    C
    SiteMapDataSource

    D
    LinqDataSource

    Note: Not available
    1. Report
  8. Question: You are using an ObjectDataSource control to connect to a business object. Which attributes of the control must you set to return data for the data source? (Choose all that apply.)

    A
    TypeName

    B
    SelectMethod

    C
    DataSourceId

    D
    SelectParameters

    Note: Not available
    1. Report
  9. Question: You want to apply caching to your data source control to increase your scalability for frequently used data. You want to set the cache to expire every 60 seconds. Which attributes of your data source control should you set to do so? (Choose all that apply.)

    A
    CacheTimeout

    B
    CacheDuration

    C
    EnableCaching

    D
    DisableCaching

    Note: Not available
    1. Report
  10. Question: You are using an EntityDataSource control on your page. You need to write a custom query that uses a parameter in the Where clause. What actions should you take?

    A
    Set the command by using the EntitySetName property.

    B
    Set the command by using the CommandText property.

    C
    Add a WhereParameters section to the EntityDataSource control markup.

    D
    Name the parameter by using the @ ParamName construct inside the Where parameter definition.

    Note: Not available
    1. Report
Copyright © 2024. Powered by Intellect Software Ltd