Buy Questpond's video subscriptions on
huge discount
.
Online: 1939
Home
Articles
Interviews
Forums
For Beginners
Popular Questions
ITIL Career Advice
PMP Career Advice
Career Advices
Codes
Videos
ASP.NET
ASP.NET MVC
Android Intel XDK
Sql Server
AngularJS
Bootstrap
Backbone.JS
MongoDB
LESS (CSS)
jQuery
WPF
WWF
SSIS
LightSwitch
Tutorials
News
ASP.NET MVC
|
Be Interview Ready
|
Top Performers
|
DNF MVP
|
Top Posts
|
Winners
|
Subscribe
|
Catalogs
Welcome Guest !
Register
Login
Home
>
Interviews
> ADO.NET
ADO.NET Interview Questions and Answers (445) - Page 14
Latest and authentic Interview questions. You can also
post an interview question
and
win monthly prizes
as well as gain community
credit points
.
445 records found.
Post
|
Interview Experiences
|
Interview FAQs
|
Online Interviews
|
Exclusive Questions
Get 650+ Questpond's Interview videos on discount
Loading ...
You define a LINQ query to retrieve entities from your database. You want to reuse the query result set multiple times without executing the query each time this result set is accessed. What should you do?
NOTE: This is objective type question, Please click question title for correct answer.
Your application includes a class named Supplier. You need to query a collection of Supplier entities named suppliers for all instances that have a Supplier.City property value of "Redmond". Which C# query do you use?
NOTE: This is objective type question, Please click question title for correct answer.
Your application includes a class named Product. Product includes properties named ProductName and CategoryID. A class named Category contains properties named CategoryName and CategoryID. You need to use LINQ to query a list of Product instances named products and a list of Category instances named categories for the names of all products belonging to the category with CategoryName "Beverage". Which query should you use?
NOTE: This is objective type question, Please click question title for correct answer.
Your application includes a collection of Product entities named products. You need to create a LINQ query to sort Product entities first by a property named Category and then by a property named ProductName. Which query should you use?
NOTE: This is objective type question, Please click question title for correct answer.
You are using LINQ to SQL to query a database. You need to retrieve an entity by its primary key when querying an entity set. If the query does not return exactly one match, the query must throw an exception. Which LINQ operator should you use?
NOTE: This is objective type question, Please click question title for correct answer.
Your application includes a collection of Product entities named products and a list of strings named excludedProductNames. You need to create a LINQ query to return a list of all product names that are not in the excludedProductNames collection. Which LINQ query should you use?
NOTE: This is objective type question, Please click question title for correct answer.
Your application includes a collection of Product entities named products. A Product property named Category gives the product category. You need to create a LINQ query to return an object that contains each unique category name along with a list of all products in that category. Which query should you use?
NOTE: This is objective type question, Please click question title for correct answer.
Your application uses LINQ to SQL to retrieve Product entities to display in a window. The window uses paging to display 25 results at a time. You add the following method: public IEnumerable<Product> GetProducts(int pageNumber) { var query = from c in db.Customers select c.CompanyName; } You need to add code to return only the subset of rows that will be shown on the page number given by pageNumber. Which code segment should you add?
NOTE: This is objective type question, Please click question title for correct answer.
You are using an Entity Data Model (EDM) that maps entity types to tables in a Microsoft SQL Server database. You need to ensure that your application can use an EntityCommand to call a stored procedure to query the database. What should you do?
NOTE: This is objective type question, Please click question title for correct answer.
You create an Entity Data Model (EDM) that maps entity types to tables in a Microsoft SQL Server database. Existing code uses SqlConnection, SqlCommand, and SqlDataReader to query the SQL Server database. You need to modify code to use the EDM with least development effort. What should you do? (Each correct answer presents part of the solution. Choose two.)
NOTE: This is objective type question, Please click question title for correct answer.
You create an application that uses the Entity Framework to access data from a Microsoft SQL Server database. You create an Entity Data Model that includes an Employee entity type and a Manager entity type that subtypes (extends) Employee. You need to write an Entity SQL query that returns only Manager entity types from a collection of employees. What should you do?
NOTE: This is objective type question, Please click question title for correct answer.
You create an application that uses the Entity Framework to access data from a Microsoft SQL Server database. You create an Entity Data Model that includes the following definitions: * A Department entity type, with properties Id and DepartmentName * An Employee entity type, with properties Id, FirstName, and LastName * An association that creates a one-to-many relationship between the Department and Employee entity types You need to use Entity SQL to query the Employees entities to return an employee name and the name of the employee's department. Which Entity SQL operator or operators should you use to access the name of the employee's department?
NOTE: This is objective type question, Please click question title for correct answer.
You create an Entity Data Model to access data from a Microsoft SQL Server database. You use Entity SQL to retrieve data. Several Entity SQL queries are used repeatedly. You need to ensure that after one of these queries is executed, it can be subsequently executed with minimal cost to performance. What should you do?
NOTE: This is objective type question, Please click question title for correct answer.
Your application connects to a Microsoft SQL Server 2008 database. You use the following query to return a SqlDataReader: SELECT MediaFile.PathName(), GET_FILESTREAM_TRANSACTION_CONTEXT() FROM Media WHERE MediaId = @MediaId The column named MediaFile is a FILESTREAM column. You need to retrieve the contents of the file referenced by this column. What should you do?
NOTE: This is objective type question, Please click question title for correct answer.
Your application connects to a Microsoft SQL Server 2008 database and executes the following query to return a DataReader: SELECT ProductId, Photo FROM Products The Photo column contains large binary bitmaps. You need to ensure that you can buffer the binary data and read the data as it is received and not a row at a time. What should you do?
NOTE: This is objective type question, Please click question title for correct answer.
Your application executes the following query: SELECT ProductId, Photo FROM Products You retrieve the result set by calling DbCommand.ExecuteReader specifying CommandBehavior.SequentialAccess. You need to read column values and buffer the binary data in the Photo column. What should you do?
NOTE: This is objective type question, Please click question title for correct answer.
Your application executes a Microsoft SQL Server 2008 stored procedure with a table-valued parameter. You must execute a SqlCommand that provides a compatible value for the table-valued parameter. What should you do?
NOTE: This is objective type question, Please click question title for correct answer.
You are writing a LINQ to SQL repository application. An entity named ImageEntity maps a SQL column of type varbinary(max) to a Binary property named ImageData. You add the following method: void WriteImage(ImageEntity imageEntity, string targetFilePath) { } You need to provide an implementation that writes the ImageData property value to an image file. What should you do?
NOTE: This is objective type question, Please click question title for correct answer.
You are creating an application that performs contact management. You load customer information from the following XML to an XmlDocument object named doc: <customers> <customer class="primary" phone="555-555-1211"> <pcp id="2432" /> <name firstName = "Thomas" lastName = "Jensen"/> <address street="12 Willow Way" city="Treeland" state="NJ" zip="14322" /> </customer> <customer class="primary" phone="555-555-1213"> <pcp id="2433" /> <name firstName = "Henrick" lastName = "Jensen"/> <address street="12 Willow Way" city="Treeland" state="NJ" zip="14322" /> </customer> </customers> You need to retrieve the city of the first customer. Which code segment do you use?
NOTE: This is objective type question, Please click question title for correct answer.
You need to choose a class to verify that an XML document is well formed and that the document validates against a schema. Which class should you choose?
NOTE: This is objective type question, Please click question title for correct answer.
1
...
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
...
23
More ADO.NET Exclusive Interview Questions & Answers here
Found this useful, bookmark this page to the blog or social networking websites.
Bookmark It
Interview Questions and Answers Categories
.NET Certifications
.NET Core
.NET Framework
ADO.NET
AI ML
Android
Angular
AngularJS 1x
Aptitute Test
ASP.NET
ASP.NET AJAX
ASP.NET Core
ASP.NET MVC
ASP.NET Web API
Aurelia
Azure
Best Practices
BizTalk Server
Bootstrap
C#
Cloud
CMS
CSS 3
Data Structures & Algorithms
Design Pattern & Practices
DotNetFunda.Com
Entity Framework
Error and Solution
F#
Function Points (FPA)
HR
HTML 5
IIS
Interview Questions
JavaScript
jQuery
Kinect
LightSwitch
LINQ
Management
Mobile Development
MSBI (SSIS, SSRS, SSAS)
Mule
Networking
News and Community
Node.js
NoSql
OOPS
Oracle
Others
PostgreSQL
PowerShell
Product Reviews
Project Management
Python
QA (Testing)
R Language
Regular Expressions
SEO
SharePoint
SignalR
Silverlight
Sql Server
TypeScript
UML
VB.NET
Visual Studio
WCF
Web Analytics
Web Services, Remoting
Windows 8
Windows Forms
Windows Metro
Windows Phone
WPF
WWF
XML