Developer Quiz on ASP.NET & SQL
Developer Quiz on ASP.NET & SQL
on the other hand when john logged in via his credentials he could .what may be the reason?
c)url cutomization
d)account rendering
3)if foreign key coloumns are not available in the model , the relationship are reffered with the object
references instead of
b)dependent association
c)relationship
d)entityrelationship
4)which all index options can be set without rebuilding the index?
a)allow_page_locks-------------ans
b)allow_row_locks-------------ans
c)ignore_dup_keys----------ans
d)data_compression
e)statistics_norecompute-------------ans
false
a)[inject]
b)none -----------------ANS
c) [injection creato]
d) [inject initialze]
a)LabelFor
b)EditorFor
c)ValidationMessageFor
A) [Link] = FALSE;
B)[Link]=FALSE;
A) [Link] = FALSE;
B)[Link] = FALSE;---------------ANS
9)SaveChanges() will be raised exception when which of the following object is added to the
b)Savexception
c)ChangeException
d)UpdateException-------------ans
true--------answer
false
11)which of the following class object is used for manipulatiing entity and trigger the changes while
insert
a) DbContext
b) DataContext
c)MOdel-defined Functions
d) None-----------doubt
12)_____________is an xml-based language which describes the entities, functions and relationships
which create a conceptual model of an application?
a) Model-wide mapping
b)entity mapping
c) property mapping
d) all -------------answer
14)what are the significance of recovery model setting??
a)it determines how much data can be recovered in the event of a media failure-----------------ans
b) it determines the location where the data should be recovered in the event of a media failure
c)the default recovery is full , which provieds the greatest level of recovery----------------ans
a)it returns the rank of each row in the table within the partition of a database-----------ans
b) the rank of a row is equal to the number of ranks that comes before the row in question
c) the rank of a row is one plus the number of ranks that comes before the row in question------ans
18)which of the following should you to choose to activate buildview property in [Link]?
ans) <MvcBuildViews>true</MvcBuildViews>
20)dependencyresolver() is destructor?
ans)false
(a)The data of aprtioned tables and indexes is divided into units .......ans
(b) the data is partitioned horizontally,...........ans
25)which statements are true about large clr user defined types?
ans)Delete(DbConnection)
28)which one of the following are the properties of the HTTPcONFIGURATION CLASS?
a) Dependency Resolver--ans
true-----------ans
[Link]<Entity>(t=>[Link]);
[Link]<Entity>().HasKey(t=>[Link]);-----ans
[Link]<Entity>(t=>[Link]);
[Link]
[Link]-----------------------------------Ans
[Link]
[Link]----------------------------------Ans
[Link] files
[Link] files-----------------------------Ans
[Link]
[Link] only--------------------------------Ans
[Link] i and ii
d.i only
[Link] owners of the caliing and the called objects must be the same.-------------------------Ans
[Link] owners of the calling and the called objects must be different.
[Link] creates a column of type int in the table & sets it as a primary key.----------------Ans
[Link] the need for the whole page to be refreshed as the result of a HTTPGet.
[Link] the need for the whole page to be refreshed as the result of a postback.---------------Ans
[Link] individual regions of the page that have changed are updated.-----------------------------Ans
40)How are user defined functions different from User-defined Stored Procedures?
[Link] user-defined function the default parameter is specified with a DEFAULT keyword.------------ans
[Link] User-defined function omitting the parameter also implies default value.
[Link]-defined functions do not support output parameters.---------------------------------Ans
41)Which of the following is used to provide short expression for querying entities over linq?
[Link] to DataSet.
[Link] to SQL.
[Link] expression.--------ans
42)Which of the following approach do we avoid working with the visual designer or entity framework?
[Link] Approach.
43)Novak is a given a task by his manager to strictly load a particular image only after page gets
[Link] will you advice him to do?
d.i,ii,iii
[Link] Manager.
[Link] Manager.-----------------Ans
[Link] Model.
[Link] Manager.
[Link] is an aggregate function that causes an additional column to be used with a value of 1 when the row
is added by either the CUBE or ROLLUP operator.--------ANS
[Link] is an aggregate function that causes an additional column to be used with a value of 0(True) when
the row is added by either the CUBE or ROLLUP operator.
[Link] is an aggregate function that causes an additional column to be used with a value of 0 when the row
is not the result of CUBE or ROLLUP operator.-------ANS
[Link] is an aggregate function that causes an additional column to be used with value equal to the number
of rows added by either the CUBE or ROLLUP operator.
[Link] is allowed only in the select list associated with a GROUP BY clause that contains either the
CUBE or RoLLUP operator. ------ANS
queries and update commands when your code interacts with the model?
Ans:True
[Link] is defined as _______ of the object, but not the behavior of the object?(QUES NOT CLEAR)
[Link]
[Link]--------------ANS
[Link]
[Link]
Ans:True
[Link] kind of data does the XML datatypes store in SQL server? (Multiple ans)
[Link] documents
[Link] maps
[Link] documents---->ans
[Link]--->ans
select one:
[Link] i and ii
b.i only
[Link] an application page, you are suppose to take students % between 40-80.
select one
a.[Range (40,80)]
b.[between (40;80)]
c.[Range (40,80)]
d.[Range (40||80)]
but he does not known how to write a code to declare that an exception is expected.
select one;
a.[[Link]=ArgumentOutOfRange]
b.[[Link]]
c.[ExpectedException(typeof(ArgumentOutOfRange))]----->ans
d.[[Link]=True]
[Link] administrator
[Link] user-->ans
[Link] role-->ans
[Link] role
[Link] role-->ans
[Link]
[Link]--->ans
[Link]
[Link]
Ans: True
[Link] your are moving your project from MVC2 to MVC3 what will be the
value of "UnobtrusiveJavaScriptEnabled"
[Link]
[Link]
[Link]--->ans
[Link]
[Link] can write raw sql query in SQLQuery() method in entity framework? T or F
Ans:true
a. [Link]--->ans
[Link]
[Link]
*************************************************************************************
***********************************************
ajith
[Link]
[Link]
Select one:
a.I only
[Link] only
2. Which of the following snippet creates database in local sql express by default?
public Context():base()
Select one:
ans:2&3
a.A User-defined table-valued function can be invoked in the FROm clause of a SELECT,INSERT,UPDATE
& DELETE statement------------------------------------------------ANS
b.A User-defined table-valued function can be invoked as a stored procedure from a clause of a
SELECT,INSERT,UPDATE & DELETE statement
c.A User-defined table-valued function can be invoked in the WHERE clause of a SELECT,INSERT,UPDATE
& DELETE statement
d.A User-defined table-valued function can be invoked in the USING clause of a SELECT,INSERT,UPDATE
& DELETE statement
4. You are given a task by your manager that includes assembly [Link] file would you configure?
Select one:
[Link]
[Link]
[Link]---------------------------------------------------------------ANS
[Link]
[Link]
[Link]----------------------------------------ANS
[Link]-defined-------------------------------------------ANS
[Link]
select one
7. Which statements are true about the maax constant in a varchar type?
a. It can be used when the data can exceed more than 8000 charcters-----------------ans
b. It can be used to fix the max length of charcters for the entire column------------------ans
8. ___________ is an XML based language which describes the entities , functions and relationships
which create a conceptual model of a application.
select one
[Link]
select one
[Link] the statement fails with an error the trigger is not executed.------------------------------ans
d. AFTER triggers cannot be specified for tables , they can only be specified fro views.
[Link] triggers cannot be specified for views, they can only be specified for tables.-----------------ans
10. Which of teh following methods make entity framework fro detecting changes automatically?
selct one
[Link]
[Link] .Remove
[Link]
[Link]---------------------------------------------ans
11) Which one in the following is not included in the configuration hierarchy?
root web
IIS
12) Unchanged State is the default state for an entity while the entity is retrieved from the database.
TRUE------------------ANs
FALSE
13) Which of the following are database initializers used in Entity Framework
CreateDatabaseIfNotExist---------------ANS
DropCreateDatabaseIfModelChanges-------ANS
DropDatabaseAlways
DropCreateDatabaseAlways---------------ANS
CreateDatabaseAlways
some expression in the query might be executed on the server and some parts might be
executed locally on the
client. Client-side evaluation of an expression takesplace before the query is executed on the
server-------------------------ANS
some expression in the query might be executed on the server and some parts might be
executed locally on the
server. Client-side evaluation of an expression takesplace before the query is executed on the
server
some expression in the query might be executed on the server and some parts might be
executed locally on the
client. server-side evaluation of an expression takesplace before the query is executed on the
server
16) which of the following statements are true about varchar data type?
each row can hold different number of characters up to the max length defined-----ANs
each row can hold fixed number of characters as defined by max length
Materialization is the process of returning query results back to the client as entity types
Materialization is the process of returning query results back to the client as CLR types-----------
ANS
Materialization is the process of returning query back to the client as CLR types
removes the need for the whole page to be refreshed as the result of a HTTPGet
only individual regions of the page that have changed are updated-------------------ANS
Removes the need for the whole page to be refershed as the result of a postback-----ANs
19) Correct syntax for ActionLink with following argument AjaxHelper, String, String, AjaxOptions is a.
string linkText,
string modelName,
AjaxOptions ajaxOptions)
b.
string linkText,
string actionName,
AjaxOptions ajaxOptions;
c.-----------------------------ANS
string linkText,
string actionName,
AjaxOptions ajaxOptions)
20) Which of the following will render carinfo object stored in viewbag to a view
Select one:
a.
<p>
</p>
b.
<p>
</p>
c.
<p>
</p>
d.---------------------------------------------- ANS
<p>
</p>
Every object can have navigation property for every relationship in which it participates
Navigation properties allow you to navigate and manage relationship in both directions,
returning either a reference object or a collection
23) which exception will raise when you define an entity data model that uses stored procedures to
make updates to the data source
OptimisticException
ConcurrencyException
OptimisticConcurrencyException-----------ANS(Doubt)
24) analyse the link:- "[Link] Choose the option which is correct for it
I only
II only--------------------------------------------------------------------------------------------ANS
both I and II
SqlDataModel
ObjectModel
26. What are the different classes into which the SQL server divides principles?
a. windows-level principle-------------------------------ANS
b. field-level principle
c. database-level principle------------------------------ANS
select one
28. How can the execution plan of queries on partitioned tables and indexes be examined?
29. You are given a task to make the current form secure such that it can be prevented csrf. Which of
the following will be helpful?
Select One
value=[Link]`1[[[Link],
BlogDataLayer]], EntityFramework/></ appSettings></configuration>---------------------------------------------
--------------------ANS
I. The CompiledQuery class provides compilation and caching of queries for reuse.
II. Execute method is to create a new delegate to represent the compiled query.
III. Once the query is compiled you can only supply parameters of primitive type but you cannot replace
parts of the query that would change the generated SQL
Select one
a. I and II
b. II and III
c. I and III------------------------------------------------------------------------------------------ANS
d. I, II and III
Select One
[([Link]
Multicolumn unique indexes guarantee that each combination of values in the index key is unique. For
example, if a unique index is created on a combination of LastName, FirstName, and MiddleName
columns, no two rows in the table could have the same combination of values for these columns.
Provided that the data in each column is unique, you can create both a unique clustered index and
multiple unique nonclustered indexes on the same table.
Unique indexes provide additional information helpful to the query optimizer that can produce more
efficient execution plans.)]
34. Which action result type will return a temporary redirect (HTTP 302 status code) or a permanent
redirect (HTTP 301 status code) depending on the Boolean parameter?
Select one
a. HttpNotFoundResult
b. RedirectResult----------------------------------------------------------------------------------
ANS([Link]
c. HttpStatusCodeResult
d. HttpRedirectResult
35. You are handling a page of event. Now the content and information you have cached so that it is
loading quickly but
you need to keep a clock which shows time for the event dynamic. Which of the following will be
helpful?
a. <%DateTime([Link]);%>
b. <%[Link](t=>[Link]())%>-------------------------------------
--------------------ANS
Select One
a. An entity key is a property or a set of properties of an entity type that are used to determine
identity--------------------------------------------------------------------ANS
b. An entity key is a property or a set of properties of an entity type that are used to determine the
column for searching index
c. An entity key is a property or a set of properties of an entity type that are used to identity
relationship among the entities.
37. Problem Statement- Peter is a web developer and has created a website in [Link] MVC3 using
razor view. People were giving feedback on his site without going through products detail page. They
were navigating to the feedback page by editing the URL.
Select one
a. The solution given by Brock is legitimate
[Link].
[Link].
[Link].---------------------------------------------Ans
[Link].
[Link].
[Link].--------------------------------------------------------------Ans
[Link].---------------------------------------------------------------Ans
[Link].
55) Which of the package can be used to write an implementation for [Link] Identity that targets
different persistence stores such as Azure Table Storage,NoSQL databases etc.?
[Link].-------------------------------------Ans
[Link].
[Link]
[Link];
57) public class DependencyResolver-is the syntax for Dependency resolver [Link] True or False.
[Link]---------------------------------------------------------------------Ans
[Link]
58) Which of the following code snippets is correct for an entity Post having relationship with Blog?
[Link]<Post>().HasRequired(p=>[Link])------------------------Ans
[Link]<Post>().NeedRelationship(p=>[Link])
[Link]<Post>().Required(p=>[Link])
59) Which of the following approach do we avoid working with the visual designer or entity framework?
[Link] Approach.
[Link] wins and store wins are actions which are used when concurrency happens.
[Link] Client wins the data from the server is loaded in to your entity objects.
[Link] Store wins data from the entity object is saved to the database.
a.i and ii
[Link] i----------------------------------------------Ans
*************************************************************************************
************************************************
mohak
Select one:
True-------------------------------------------------------ANS
False
Select one:
True-------------------------------------------------------ANS
Fasle
[Link] to Entity Query results are usually returned as which of the following?
Select one:
a.A collection of zero or more typed entity objects or a projection of complex types defined in the
conceptual model.
[Link] collections
[Link] to objects
[Link] types
Select one:
b.L10N-------------------------------------------------------ANS
[Link]-zation
[Link]
a. The login
b. The user--------------------------ANS
c. Authentication memberships--------ANS
d. Role memberships-----ans
e. Role aggregation
[Link] are user defined functions different from User-defined Stored Procedures?
[Link] user-defined function the default parameter is specified with a DEFAULT keyword.----ans
[Link] User-defined function omitting the parameter also implies default value.
a.@---------------------------------------------------ANS
b.%
c.#
d.$
[Link] is given a task to make his website a bit intelligent and in the process he's been told to add
autocomletion on the "searchBox".Which of the following will be helpful?
select one
ans: $function(){
$("#searchBox").autocomplete("/Product/SearchCandidates",{minChars:3});
});
[Link] that the DML trigger is excuted instead of the triggering SQl statement
Select one:
[Link] provider-------------------------------------------------------ANS
[Link]
[Link]
[Link]
select one:
[Link] data columns of the underlying table are not stored in order based on their nonclustered keys.
[Link] data rows of the underlying table are sorted and stored in order based on their nonclustered
keys.-------------------------------------------------------ANS
[Link] leaf layer of a nonclustetred index is amde up of index pages instead of data pages.--------------------
-----------------------------------ANS
[Link] leaf layer of a nonclustetred index is amde up of data pages instead of index pages.
a.A clustered index sorts and stores the data rows of the table or view in order based on clustered index
key-------------------------------------------------------ANS
b.A clustered index sorts and stores the data columns of the table or view in order based on the
clustered index key.
Select one:
[Link]-------------------------------------------------------ANS
[Link]
[Link]
select one:
[Link]
[Link]
[Link]-------------------------------------------------------ANS
[Link]-------------------------------------------------------ANS
[Link] of the following annotation is used to mark one or more properties to be used for concurrency
checking while user modifies in an entity?
Select one:
[Link]-------------------------------------------------------ANS
[Link]
[Link]
[Link] the link:- "[Link] Choose the option which is correct for it
I only
II only---------------ANS
both I and II
[Link] default in Entity Framework Snapshot change tracking is enabled snapshot change tracking
mechanism.
True-------------------------------------------------------ANS
Fasle
a)it determines how much data can be recovered in the event of a media failure-----------------Ans
b) it determines the location where the data should be recovered in the event of a media failure
c)the default recovery is full , which provieds the greatest level of recovery-----------------Ans
Select one:
a.[....@[Link]("Hello","Hello",new AjaxOptions(){UpdateTargetID="div-
hello",HttpMethod="GET",LoadingElementId="divloadingimage"})....]
b.[....@[Link]("Hello","Hello",new AjaxOptions(){UpdateTargetID="div-
hello",HttpMethod="GET",LoadingElementId="divloadingimage"})....]
c.[....@[Link](AjaxOptions(){UpdateTargetID="divhello",HttpMethod="GET",LoadingElementId
="divloadingimage"})....]
d.[....@[Link]("Hello","Hello",new
AjaxOptions(){UpdateTargetID="divhello",HttpMethod="GET",LoadingElementId="divloadingimage"})....
]------ans
[Link] template is used in entity framework to generate code in C# by reading .edxm file?
a. C# template
b. T4 template---------------------------------ANS
c. XML template
d. none
[Link] of the following are used to locate the entities at the ends of an association in a conceptual
model?
Select one:
[Link]
[Link]
[Link]
Select one:
a.A technique gor achieving tight coupling between objects and their collaborators.
b.A technique gor achieving loose coupling between objects and their collaborators.---------------------------
----------------------------ANS
c.A technique gor achieving tight coupling between Model and their views.
d.A technique gor achieving tight coupling between Model and their respective server.
[Link] define the______________of an object but not the behavior of the object.
select one:
[Link]
[Link]-------------------------------------------------------ANS
[Link]
Select one:
[Link]-Green-Refactor-------------------------------------------------------ANS
[Link]-Error-Resolve
[Link]-Green-Resolve
[Link]-Pass-Repeat
True-------------------------------------------------------ANS
False
[Link]
[Link]
Select one:
a.I only
[Link] only
[Link] of the following keyword is used for lazy loading related data in entity framework?
Select one:
[Link]
[Link]-------------------------------------------ANS
[Link]
[Link]
A) [Link] = FALSE;
B)[Link]=FALSE;
C) [Link] = FALSE;
D)[Link] = FALSE;---------------ANS
[Link] of the package can be used to write an implementation for [Link] Identity that targets
different persistence stores such as Azure Table Storage, NoSQL databases etc..,?
Select one:
[Link]
[Link]...................ans
[Link]
[Link]
Select one:
32. Which of the following statements are true about extended stored procedures?
d. they are programmed by using the SQL server extended stored procedure APL--------------------------------
-----------ANS
33. ObjectContext mainly used for which of the following ?
i. Database connection
Select one:
a. i and ii
b. i and iii
c. ii and iii
d. i, ii and iii-------------------------------------------ANS
select one:
35. which of the following is the correct option to get related subjects count without loading
select one:
Take(b =>[Link]).Query().Count();
Include(b =>[Link]).Query().Count();
Collection(b =>[Link]).Query().Count();--------------------------------------------------------------------------------
ANS
36. Which statements are true about nonclustered indexes with respect to partitions?
a. nonclustered indexes have one row in [Link] with index_id >0 for each partition used by the
index-------------------------------------------ANS
b. nonclustered indexes have one column in [Link] with index_id >0 for each partition used by
the index
e. each partition has a B-tree structure that contains the index rows for that specific partition------ans
37. If we want to retrieve friend along with contact entity, which of the following code will fetch us the
required result ?
select one:
a. SQL server stores only the source for stored procedures and rtiggers--------------------------------------------
------------------------------ANS
b. SQL server keeps the stored procedures & triggers in compiled form for future execution
c. when a stored procedure or trigger is first executed, the source is compiled into an execution plan-----
---------------------------------------ANS
d. if the stored procedure or trigger is again executed before the execution plan is aged from memory,
the relational
e. if the execution plan has aged out of memory, a new plan is built-------------------------------------------------
----------------------------ANS
39. Jason is trying to access Appsettings of "sampleserverA" & the accidently wrote this varserver =
select one:
40. choose a code block which will show "Hello World" on the WEb page
select one:
return View();
return View();
return View();
41. "Type or Namespace name "SampleTest" could not be found" - you are getting the above error while
you
select one:
a. You didn't instantiate the object for the sampletest controller and view
select one:
a. true-------------------------------------------------------------ANS
b. false
43. which of the following are the standard query operators of LINQ ?
select one:
a. select
b. where
c. groupby
44. which method in the DBcontext writes inserts, updates and deletes to the data source ?
select one:
a. save
b. saveChanges-------------------------------------------ANS
c. saveEntity
select one:
c. URL customization
d. Account rendering
46. Entity framework provides us with which of the following attribute to indicate multiple relationships
select one:
a. [insertProperty]
b. [InverseProperty]------------------------------------------------------------ANS
c. [INProperty]
the database changes, an error pops up in the application. which of the foolowing method should sam
add to take care of this ?
select one:
a. DropCreateDatabaseselfModelChanges<>()-------------------------------------------ANS
b. RefreshDb<>()
c. DeleteUpdateDatabaseselfModelChanges<>()
49. which statements are true about the max constant in a varchar type ?
select one:
a. It can be used when the data can exceed more than 8000 characters---------------------------------------------
-----ANS
b. it can be used to fix the max length of characters for the entire column-----------------------------------------
--ANS
select one:
[Link]
[Link]
[Link]---------------------------------------------------------------------------------------ANS
[Link]
Select one :
a.App_Data
b.App_Start-------------------------------------------ANS
[Link]
[Link]
[Link] is a new developer and the manager has told him to make the current code less [Link]
current code
Select one:
[Link] him to use seperate models and controller for each logic and store it in new database
[Link] him to use partial views and create custom Html helpers to make the ocde readable and less
croeded of all the things in one place.---------------------------ANS
Select one:
[Link] Transaction-------------------------------------------ANS
[Link]
[Link]
[Link] partition function to specify how a table or index that uses the function can be partitioned-------
------------------------------------ANS
[Link] partition function to specify the placement of the partitions of a partition function on
filegroups
[Link] partition Schema to specify the placement of the partitions of a partition function on
filegroups------------------------------------------ANS
[Link] partition Schema to specify how a table or index that uses the function can be partitioned
[Link] file must reside on one of the following devices: the local server on which SQL Server is installed,a
Storage
[Link] path specified must exist on the drive prior to creating the database---------------- Ans
[Link] the correct code to execute sql raw query in the entity frameqwork from the following
select one:
[Link] of these
select one:
a.-------------------------------------------ANS
<p id-"sample"></p>
<script>
[Link]("sample").innerHTML=[Link]();
</script>
b.
<p id-"sample"></p>
<script>
[Link]("sample").innerHTML=[Link]();
</script>
c.
<p id-"sample"></p>
<script>
[Link]("sample").innerHTML=[Link]();
</script>
d.
<p id-"sample"></p>
<script>
[Link]("sample").innerHTML=[Link]();
</script>
[Link] of the following is issued to obtain a configuration object for a given property in Fluent API?
Select one:
[Link]()
[Link]()
[Link]()
[Link]()-------------------------------------------ANS
[Link]----------------------------------ANS
[Link]
[Link]----------------------------------ANS
[Link]
*************************************************************************************
************************************************
arjun
shown in this topic apply equally to models created with Code First and the EF Designer.
select one:
[Link] Loading
[Link] Loading
[Link] Loading
[Link] -----------------------------------------------------------------------------ANS
[Link] stored procedure returns complex type that is only on conceptual model and not in databse table
ans:complex
[Link] wants to make the appearence of his site [Link] wants to show an image when a
"divhello" result takes time to display
a.[....@[Link]([Link]())
UpdateTargetId="div-hello",Httpmethod="GET",LoadingElementId="divloadingimage"
} )...]
b.[....@[Link]("Hello","Hello",new [Link]())
UpdateTargetId="div-hello",Httpmethod="GET",LoadingElementId="divloadingimage"
} )...]
c.[....@[Link]("Hello","Hello",new [Link]())
UpdateTargetId="divhello",Httpmethod="GET",LoadingElementId="divloadingimage"
} )...]-------------------------------------------------------------------------------------------------------ANS
d.[....@[Link]([Link]())
UpdateTargetId="divhello",Httpmethod="GET",LoadingElementId="divloadingimage"
} )...]
[Link]
[Link]...............ans
[Link] can CLR functions be used?
Select one
[Link](
Type serviceType
[Link] GetService(
Type serviceType
)-----------------------------------------------------------------------------ANS
[Link] GetService(
[Link]
)
[Link] GetService(
[Link]
ans:true
so that the same content does not need to be generated each time the same controller method is
invoked
ans:true
[Link] of the following method is used to get correct type for the specified target role in a
relationship in the class relationshipmanager?
select one:
[Link] End---------------------------------------------------ANS
[Link]
[Link]
[Link]
[Link] can we get the single employee name when there are many employees whose name is "John" in
the database?
Select one:
[Link] query
Note:The input to the optimizer consists of the query, the database schema (table and index
definitions), and the database statistics.
([Link]
[Link]
[Link]
[Link] returns the rank of each row in the table within the partition of a database.----------------------------------
--ANS
[Link] rank of a row is equal to the number of ranks that come before the row in question.
[Link] rank of a row is one plus the number of ranks that come before the row in question--------------------
-----ANS
[Link] Rank function does not always return consecutive integers. ---------------------------------------------------
----------------------ANS
Select one:
True----------------------------------------------------ANS
False
[Link] are the conditions for assemblies created by using EXTERNAL ACCESS permission sets?
[Link] classes or methods of the assesmbly should be annotated only with allowed codes attributes--------
----------------------------------------------------ANS
([Link]
Select one:
[Link] web
[Link]
Select one:
[Link] is the process of returning query results back to the client as entity types.
[Link] is the process of returning query results back to the client as CLR types.---------------------
----------ANS
[Link] is the process of returning queries back to the client as CLR types.
Select one:
[Link] packageName----------------------------------ANS
[Link] package
[Link]-package PackageName
[Link] need to write a view to show Hi!"username" If user is authenticated display signoff link & sign in
link for anonymous user.
Select one:
a.<%if([Link]){Hi!<%=[Link]([Link])%>[<%=[Link]
k("SignOff","SignOff","Account")%>]<%}else{%>[<%=[Link]("Sign In","Sign
In","Account")%>]<%}%>-------------------------------------------------------------------------------------------ANS
b.<%{Hi!<%=[Link]([Link])%>[<%=[Link]("Sign Off","Sign
Off","Account")%>]<%}else{%>[<%=[Link]("Sign in","Sign in","Account")%>]<%}%>
c.<%(user=Authorize){Hi!<%=[Link]([Link])%>[<%=[Link]("Sign
Off","Sign Off","Account")%>]<%}else{%>[<%=[Link]("Sign in","Sign in","Account")%>]<%}%>
a) "a"
b) "=>"-----------Ans
c) " "
d) "@"
ans:true
Note:Detached is the default state of a newly created entity because the context cant track the creation
of any object in your code.
a) Returns the rank of rows within the partition of a result set, without any gaps in the ranking---------
Ans
b) The rank of a row is one plus the number of distinct ranks that come before the row in question-------
--Ans
c) Returns the rank of each row within the partition of a result set
d) The rank of a row is one plus the number of ranks that come before the row in question
[Link] are given a task by your manager that include assembly binding??
ans:[Link]
Note: [Link] contains configuration settings for machine-wide assembly binding, built-in
remoting channels, and [Link].
a) Updates a package----------Ans
35) On what conditions can you perform concurrent online index operations on the same table?
a) [Link]=false
b) [Link]=false
c) [Link]=false
d) [Link]=false----------Ans
a) it is a mechanism that can make a remote client call in order to validate a form field without passing
the entire form to the server
d) A mechanism that can make a remote server call in order to validate a form field without posting the
entire form to the server------------Ans
32) Which of the following is the CORRECT option for Model First approach?
31) Which of the following are the properties of the HTTPConfiguration class?
a) Message Handlers----------Ans
b) Comparer
c) Stack Tree
d) Dependency Resolver--------Ans
[Link] Model We can keep Which of the following:
a:Business Logic..............ans
b:Data Logic..................ans
c:Session Logic...............ans
d:Validation Logic............ans
Note:The model is where the domain-specific objects are defined. These definitions should include
business logic (how objects behave and relate),
validation logic (what is a valid value for a given object), data logic (how data objects are persisted) and
session logic (tracking user state for the application).
d)none
Note: You can apply NotMapped attribute to a property which you do NOT want to create a column in a
database table for.
a)all server
b)with encryption
c)execute as--------------ans
d)instead of
[Link] Loading
[Link] Loading
[Link] of the following two are name types of SQL Server Files?
a:Physical_File_name
b:Logical_file_name......................ans
c:Primary_File_Name
d:Os_File_Name...........................ans
23.23)which of the following options are true about temp. stored procedures
b:Heavy use of temporary stored procedures can create contention on the system tables in tempdb
and adversely affect performance........ans
e:sp_executesql discard data in the system tables and therefore avoids the problem............ans
[Link] entity framework ,Data is retrieved as objects.
true..................ans
false
select one
a:Added
b:Deleted
c:Modified
select one
a. An entity is a property or a set of properties of an entity type that are used to determine identity.------
------------------ans
b. An entity is a property or a set of properties of an entity type that are used to determine the column
for searching index
c. An entity is a property or a set of properties of an entity type that are used to identify relationship
among the entities
[Link] the following definition and choose the correct option. -->Contains methods to create types of
objects locally or remotely ,or obtain references to existing remote objects.
select one
a:Activator................ans
b:Validator
c:ModelBinder
d:Dependency Resolver
[Link] need to perform an arithmetic operation in Razor view. which of the following will accomplish
the task?
a. "@[value][arithmatic operator][value]"
b. "@;([value][arithmatic operator][value])"
c. "@:([value][arithmatic operator][value])"
d. "@([value][arithmatic operator][value])"-------------------------------------------------------------ANS
a. ability to transform the result of a query into XML on the client side ---------------------------------------------
----------------ANS
b. ability to create an XML view of relational data bye using an annotated XSD mapping schema file-------
------------------------------------------------------ANS
e. ability to expose functionality offered by stored procedures, user-defined functions, and template
queries as SOAP-based web services-------------------------------------------------------------ANS
return View();
Select one:
a. Both I and II
b. II only
d. I only-------------------------------------------ANS
[Link] which of the following conditions one should go for partitioning table
[Link] contain large amounts of data that are used in different ways.-----ans
[Link] or updates against the table are not performing as intended, or maintenance costs exceed
predefined maintenance periods.....ans
[Link] of the statement are true about DATABASE argument of the create trigger statement
[Link] trigger fires whenever new record is inserted in table in current database
[Link] trigger fires whenever record is deleted from table in current database.
[Link] of the following method is used to change relationship state of two entity object
[Link]
[Link]--------------------------ANS
[Link]
select one:
[Link]
[Link]
[Link]..................ans
[Link]
Note:[Link] configuration data is stored in XML text files that are each named [Link].
Select one:
[Link] I
[Link] II
[Link] I or II
[Link] Framework____________________ all data before storing it to the database by default ,using
valiadtion method.
[Link] ..........ans
[Link] of the following method in Entity type configuration is used to configure an optional
relationship?
[Link]..........ans
[Link] are the different classes into which sql server divides principals?
ans:a,c,d
4.___________ allows you to store and retrieve values using object-property syntax rather than key-
value syntax used by dictionary object.
[Link].................ans
[Link]
[Link]
[Link]
select one
[Link] API....................ans
[Link]
[Link]
[Link] provides the ability to asynchronously exchange data between a web browser and a web server?
select one
[Link].................ans
[Link]
[Link]
[Link]
*************************************************************************************
********************************************************************************
gokul-1st attempt
(Gokul)
[Link] are given a task to make the current from secure such that it can be prevented [Link] of the
following will be helpful?
Select one:
[Link] the statemnt falls with an error the trigger is not executed...............................ans
[Link] triggers cannot be specified for tables,they can only be specified foe views
[Link] triggers cannot be specified for views,they can only be specified foe tables...................ans
ANS:a,c,e
True--------------------------------------------------------------------------------------------ANS
false
[Link] can the execution plans of queries on partitioned tables and indexes be examined?
Select one:
a.I only
[Link] only--------------------------------------------------------------------------------------------ANS
[Link] I and II
Select one:
ANS:a,b,c
Select one:
Select one;
True--------------------------------------------------------------------------------------------ANS
False
Select one:
[Link]<Blog>().MapStoredProcedures();
[Link]<Blog>().MapToStoredProcedures();--------------------------------------------------------------
--------------------ANS
[Link]<Blog>().ToStoredProcedures();
[Link]<Blog>().StoredProcedures();
ANS
value="[Link]'1[[[Link],BlogdataLayer]]
,EntityFramework"/>
</appSettings></configuration>
Navigation properties provide a way to navigate an association betwwen two entity types
Every object can have a navigation property for every relationship in which it participates
Navigation properties allow you to navigate and manage relationship in both directions,
returning either a reference object or a collection
14) How is a user defined table valued function in select insert update or delete statements is invoked?
a user defined table valued function can be invoked in the from clause of a select, insert, update
and delete statement------------ANS
a user defined table valued function can be invoked as a stored procedure from a select, insert,
update and delete statement
a user defined table valued function can be invoked in the where clause of a select, insert,
update and delete statement
a user defined table valued function can be invoked in the using clause of a select, insert, update
and delete statement
15) Entity framework supports automatic change tracking of the loaded entities during the life time of
the conext.
true-----------------------------ANS
false
Secondary
Primary------------------ANS
User-defined-------------ANS
Hidden
17) Which statements are true about CLR stored procedures?
they are implemented as public static ,methods on a class in a .net framework assembly-----------
-------ANS
they atre implemented as private protected methods on a class in a .net framework assembly
18) You are working on a web application and for a particular small operation it is loading the whole
page. Which of the following technology will you adopt to improve the functionality
AJAX-------------------------ANS
C++
sharepoint
selenium
19) Which of the following methods make entity framework for detecting changes automatically?
[Link]
[Link]
[Link]
20) Which exception will raise when you define an Entity Data Model that uses stored procedures to
make updates to the data source
OptimisticException
ConcurrencyException
OptimisticConcurrencyException
FALSE----------ANS
TRUE
NONE
AUTO
22) Which of the following will render carinfo object stored in viewbag to a view
<p>---------------------------------------------- ANS
</p>
23) Problem statement:- peter is a web developer and has created website in ASP>NET MVC# using
razor view. people were giving feedback on his site without goignthrough the products details page.
they were navigating to the feedback page by
[Link]
[Link]---------------------------ANS
[Link]
[Link]
25) ModelBinder interface defines---------
41. You are given a task by your manager that includes assembly [Link] file would you
configure?
select one:
[Link]
[Link]
[Link]-----------------------------------ANS
[Link]
42.
Unchanged state is the default state for an entity while the entity is retrived from the database
[Link]-----------------------------------------------ANS
[Link]
[Link] row can hold fixed number of characters as defined by max length.
[Link] action result typewill return a temporary redirect(HTTP 302 sattus code) or a permanent
redirect(HTTP 301 status code),depending on a boolean parameter?
select one:
[Link]
[Link]
[Link]
[Link]------------------------------------------ANS
[Link]----------------------------------------ANS
[Link]
46.______________is an XML -based language which describes the entities ,functions and relationships
which create a conceptual model of a application.
select one:
[Link] of above
47. Which statements are true about the max constant in a varchar type?
[Link] can be used when the data can exceed more than 8000 charactes.---------------------ans
[Link] can be used to fix the max length of charactes for the entire column---------------------ANS
[Link]---------------------------------------ANS
[Link]
[Link] of the package can be used to write an implementation for [Link] identify that targets
different persistence store such as Azure Table Storage,NoSql database etc.
[Link]---------------------------------------------------ANS
[Link]
[Link]
d. [Link]
select one:
[Link]=false;------------------------------------ANS
[Link]=false;
[Link]=true;
[Link]=True;
[Link] CompiledQuery class provides compilation and caching of queries for reuse
[Link] the query is compiled you can supply parameters of primitive type but you cannot replace parts
of the query that would change the generated SQL
a.i and ii
[Link]
[Link]
a.i only
[Link] only
53)Which of the following snippet creates database in local sql express by default?
public Context():base()
public SchoolDBContext():base("name=EduDB")
a.i and ii
b.i and iii
54)Which of the following code snippets is correct for an entity Post having relationship with Blog?
[Link]<Post>().HasRequired(p=>[Link])------------------------Ans
[Link]<Post>().NeedRelationship(p=>[Link])
[Link]<Post>().Required(p=>[Link])
[Link]--------------------------Ans
[Link]-------------------Ans
[Link]
[Link]---------------------------Ans
[Link]
57)What are the different classes into which the SQL Server divides principals?
[Link]-level principal-----------------------------Ans
[Link]-level principal
[Link]-level principal-----------------------------Ans
[Link] Server-level principal---------------------------Ans
[Link] entity key is a property or a set of properties of an entity type that are used to determine identity--
----------------------Ans
[Link] entity key is a property or a set of properties of an entity type that are used to determine the
column for searching index
[Link] entity key is a property or a set of properties of an entity type that are used to identify relationship
among the entities
[Link]---------------ans
[Link]
[Link]-------------------Ans
[Link]
[Link]------------------Ans
[Link]---------------------Ans
*************************************************************************************
*************************************************************************************
*************************************************************
HEMANT
[Link] of the following will render carinfo object stored in VIewBAg to a view?
select one
a.<p>
</p>
b.<p>
c.<p>
</p>---------------------------------ans
d.<p>
</p>
[Link] good practice what should you follow to prevent XSS attacks?
select one:
[Link] is a process by which you override the state and client information over multiple requests for the
same pages.
[Link] is a process which you override the state and page information over single functional calls for the
same controller
[Link] is a process by which you maiintain the client and server information over multiple requests for the
same or different pages
[Link] is a process by which by whoch you maintain the state and page information over multiple requests
for the same or different pages------ans
[Link] objects(child objects)are not loadede automatically with its parent object until they are
requested.
Select one:
a.I only-----------------ans
[Link]
[Link] I and II
[Link] only
[Link] user-defined function the default parameter is specified with a DEFAULT keyword---------------ans
[Link] user-defined function omitting the parameter also implies default value
[Link]
[Link] View
[Link]-Partial View
select one:
d.I,II,III
a. A non-determiinstic function always returns the same result when it is called with a specific set of
input parameters
b.A deterministic function always returns the same result when it is called with a specific set of input
parameters-----------------ans
c.A non-deterministic function always returns the different results when it is called with a specific set of
input parameters--------------ans
d.A deterministic function always returns the different results when it is called with a specific set of
input parameters
[Link] of the following option is Correct to turn off lazy loading for all the entities for BLogging
Context?
select one:
[Link]
[Link] method in MOdelBuilder make sure that entity should have relationship with other entity?
select one:
[Link]
[Link]
[Link]---------------ans
[Link]
a. Timestamp-------------------ans
b. Model
c. ConcurrencyCheck------------------ans
d. Entity
[Link] of the following statement is used to fetch an entity using composite key ?
select one:
[Link](key1,key2)-----------------------ans
[Link](key1,Key2)
[Link](key1,key2)
[Link](obj)
[Link] Resolver---------ans
[Link] Handlers----------ans
[Link]
select one:
[Link]
[Link] is a class.
true----------ans
false
[Link] which system Storeprocedure the administrator will register the extended stored procedure
DLL to the SQL server?
select one:
a.sp_ActiveDirectory_obj
b.sp_addextendedproc----------ans
c.sp_addlinkedsrvlogin
d.sp_addlinkedserver
True------------ans
FAlse
[Link] type of authentication accepts login credentials that will be checked against the domain or
local server and are sent in a hashed format?
select one:
[Link] Authentication
[Link] Authentication-------------------ans
[Link] Authentication
[Link] Authentication
[Link]
[Link] of the following class provides you important methods to configure entities and its properites
to override various code-first conventions?
select one
[Link]
[Link]---------------ans
[Link]
[Link]
True
FAlse
True-------ans
False
[Link] COnceptual model,which of the following defines relationship between two entity types?
select one:
[Link]
[Link]----------------ans
[Link]
[Link]
select one:
[Link]
[Link]------------------ans
[Link]
[Link]
[Link] of the following loads the related data inscalaar and navigation properties along with query
result at first shot ?
select one :
[Link] Loading
[Link] Loading------------------ans
[Link] Loading
[Link] Loading
[Link] class is used to execute an Entity SQL COmmand against an entity mode ?
select one
[Link]-------------ans
[Link]
[Link]
[Link]
[Link] function body defined in BEGIN ...END block contains a series of T-SQL statements--------------ans
[Link]
[Link]------------ans
[Link]
[Link]-----------ans
select one:
[Link] time
[Link]---------ans
[Link] buffering
[Link]
selct one:
[Link] the appropriate action method to call and validating that it can be called
[Link] the values to use as the action method's arguments.
[Link] all errors that might occur during the execution of the action method
[Link]------------ans
[Link] a unit test to check whether the partcipant A1 has covered half distance of total.
Select one
a.
[TestMethod]
int total_distance=2;
int distance_covered=10;
int distance_left=10;
[Link](distance_covered);
int left=[Link];
[Link](distance_left,left); -----------------ans
b.
[TestMethod]
int total_distance=2;
int distance_covered=10;
int distance_left=10;
[Link](distance_covered);
int Left1=[Link];
[Link](distance_left.left);
c.
[TestMethod]
int total_distance=2;
int distance_covered=10;
int distance_left=10;
[Link](distance_covered);
int Left1=d1@remaining;
[Link](distance_left.left);
PRINT @[Link]();
Select one or more:
[Link] operator provides access to public non-static memebers of acompind data type
[Link] of the following model is the design model to include tables,stored procedures,views,keys and
relatonship?
Select one:
[Link]
[Link]----------------------ans
[Link]
Select one:
[Link]=-------------ans
[Link]
[Link]
[Link]
[Link] of the following method of the ObjectStateManager is used to get Object State entry?
Select one:
[Link]-------------ans
[Link]
[Link]
[Link]
[Link]----------------ans
[Link]
[Link]--------------ans
[Link]
*************************************************************************************
************************************************************************************
MATHI
1) Which namespace is used to include NET data provider for SQL server?
2) When you execute user-defined functions that return scalar values, hw are the parameters specified?
a)HTMLSerializationLibrary
b)CSRFLibrary
c)AntiXSSLibrary-------Ans
d)SecurityLibrary
=> True-----Ans
7) You are given a task to restrict the user to enter the surname which shall not be more than 15
characters How you will achieve this/
=> [StringLength(15)]
=> True------Ans
10)Database model provides the normalized schema designed by the database administrator
=> True-------Ans
.SCHEMA-NAME(schema_id) AB schema_name
.type-desc
.create_date
.modify_date
=> Localization is the process of = Adapting a global product for a particular language and country---Ans
17)We can write raw sql query in SQLQyery() method in entity framework
=> True----Ans
*************************************************************************************
*****************************
PRAJAKTA
select one:
[Link]
[Link]
[Link] which of the following the entities and relationships are created on the EDMX design surface?
select one:
[Link] Approach
[Link]
select one:
[Link]-----------------------ans
[Link]
[Link] Always
[Link]
[Link] a user clicks on a product, you have to make sure to ask him/her whether he/she sure about
it or not .
select one :
a.<%=[Link]("Click here","Sample". new AjaxOptions
(LoadingElementId="AONE",Question="Are you sure ?", Update TargetId="ProductAone",})%>
b. handling all errors that might occur during the execution of the action method.-----------------ans
([Link]
13. what are available database initializers in EntityFramework Code first model?
a. CreateDatabaseifNotExists.-------------ans
b. DropCreateDatabaseWhenModelCHanges
c. DropCreateDatabaseAlways------------------ans
15. which of the following are used to locate the entities at ends of an association in a conceptual
model?
a. Navigation properties-------------------------ans
b. Attributes
c. Index
d. Proxy
16 and 21(both same options in diff order). which of the following code will provide custom error pages
for 404 errors and general exceptions?
a. <[Link]>
<errorstatuscode=404redirect=ErrorController.Status404/>
</customerrors>
</[Link]>
--------------------------------------------------------------------------------ans a
b. <[Link]>
<errorstatuscode=404redirect=ErrorController.Status404/>
</customerrors>
</[Link]>
<[Link]>
<httpErrorserrormode=Detailed/>
</[Link]>
c. <[Link]>
<errorstatuscode=404redirect=ErrorController.Status404/>
</customerrors>
</[Link]>
<[Link]>
<httpErrorserrormode=Detailed/>
</[Link]>
d. <[Link]>
<customErrors mode=RemoteOnly>
<errorstatuscode=404redirect=ErrorController.Status404/>
<errorstatuscode=GeneralExceptionredirect=Error/GeneralException/>
</customerrors>
</[Link]>
<[Link]>
<httpErrorserrormode=Detailed/>
</[Link]>
22. You want to return a file from the server which method you will use?
a. Display File
b. return file------------------------ans
c. download file
d. None
23. which of the followinf are used to locate the entities at the ends of an association in a conceptual
model?
a. Navigation properties-------------------------------------ans
b. attributes
c. Index
d. Proxy
25. Which of the following statements are true about AFTER Trigger?
d. AFTER triggers cannot be specified for tables, they can only be specified for views
e. AFTER triggers cannot be specified for views, they can only be specified for tables.------------------ans
29. Repeated
a. LCN
b. L10N----------------------------ans
c. All
d. LOC-zation
[Link] output cache contains a different version of the requested document for each combination of
specified parameters is applicable for?
select one:
[Link]
[Link]
[Link]-----------------------------------ans
[Link]
select one:
[Link]<Product>().property(p=>[Link]).DirectMap("product_id");
[Link]<Product>().property(p=>[Link])==("product_id");
[Link]<Product>().property(p=>[Link])=("product_id");
[Link]<Product>().property(p=>[Link]).HasCoulmnName("product_id");-----------ans
I. coderush express
b. II only
c. I only-------------------------ans
d. Both I and II
[Link] errors that might occur dring the execution of the action method--------------------ans
select one:
a. .rsrcx
b. .srcx
c. .resx---------------------------ans
d. .src
55. which of the following class provides you important methods to configure entities and its properties
to override various code first conventions?
select one:
[Link]
[Link]------------------------ans
[Link]
[Link]
[Link] you are testing the value of variable "a" is not getting set and you need to have value of "a"
before stating of test.
select one:
*************************************************************************************
*************
[Link] of the following statements is used to fetch an entity using composite key?
Select one:
[Link](key1,key2)-----ans
[Link](key1,key2)
[Link](key1,key2)
[Link](Obj)
[Link] testing,you are using dynamically generated test [Link] type of test double it is?
Select one:
[Link]-------ans
[Link]
[Link]
Select one:
[Link]
[Link]
[Link]---------------ans
Select one:
Select one:
b.A Global temporary procedre is available to all connections with explicit EXECUTE permission.
c.A Global temporary procedure is dropped when the clean-up function is called by the calling
procedure.
d.A Global temporary procedure is dropped at the end of the last session using the procedure.------ans
[Link] a global temporary procedure is created,all users with EXCUTE permissions can access it &
permissions can also be revoked explicitly.
[Link] want a particular section of your site to be accessed by "Admins" [Link] of the following is
the correct option to go about it?
Select one:
[Link]=Admins
[Link]="Admins"
[Link](Roles=Admins")------ans
d.(Authorize="Admins")
[Link] will be the order of TDD steps:
[Link] it fail.
Select one:
[Link],IV,I,II----------ans
[Link],I,II,IV
[Link],I,II,III
[Link],I,IV,III
Select one:
[Link] a class library to be executed, whenever an AJAX reqest begins and there is more tahn one
active.
[Link] a header to be executed,whenever an AJAX reqest begins and there is none already active.
[Link] a function to be executed,whenever an AJAX reqest begins and there is none already active.----
----------ans
[Link] a method to be executed,whenever an AJAX reqest begins and there is none already active.
Select one:
Note:The INSERT statement in the following code segment reads the content of file C:\temp\[Link]
as a BLOB by using OPENROWSET.
A new row is inserted into the table named docs with a value of 10 for the primary key and the
BLOB for the XML column xCol.
A well-formedness check occurs when file content is assigned to the XML column.
[Link] entity sets can be defined using the same entity type.--true
[Link] instance of a given type can only exist in one entity set.---ans
[Link] entity key for the instance may not unique within the entity set.
Select one:
Note:The entity key for the instance is unique within the entity set.
Select one:
[Link]<Entity>(t=>[Link]);
[Link]<Entity>().HasKey(t=>[Link]);-----ans
[Link]<Entity>(t=>[Link]);
Select one:
True---ans
False
[Link] need to install A but it requires [Link] this scenario,what will the Nuget download?
Select one:
[Link] A
c.A & B
[Link] B
Select one:
True----true
False
Select one:
True---ans
False
I.n Entity Framework, an entity can be related to other entities through an association(realtionship)
[Link] relationship contains two ends that describe the entity type and the multiplicity of the
type(one,zero-or-more,or many)for the two entites in that relationship.
Select one:
[Link] I
[Link] II
[Link] I nor II
[Link]-First will create the database tables with the name of_________ properties in the context class.
Select one:
[Link]
[Link]
[Link]
[Link]----ans
[Link] do you understand by RAW ajax?
Select one:
Select one:
True---ans
False
Select one:
True---ans
False
Note:By creating [Link] file in sub root folders we can use multiple [Link]
files in our application but each folder should contains only one [Link] file.
Select one:
[Link]------------ans
[Link]
[Link]
[Link]
Select one:
[Link] not only let you describe client and server side validation in your code first classes,
but they also allow you to enchance and
even correct the assumptions that code first will make about your classes based on its conventions.
[Link] DataAnnotations you can not only drive database schema generation, but you can also map your
code first classes to a pre-existing database.
[Link] provide only the most commonly needed configuration changes you can be make on
your code first classes.
[Link] of the following line of code will invoke the cart controllers ad method?
Select one:
[Link] redirect("Cart/Add")
[Link] View("[Link]")-----------------------ans
[Link] Content("[Link]")
[Link]("[Link]?Add")
[Link] foreign key columns are not avaliable in the model, the relationships
are reffered with the object references instead of foreign key [Link] is this association
called?
Select one:
[Link] association---------------ans
[Link] association
[Link]
[Link]
*************************************************************************************
*****************************************************
JASBIR-ENTITY FRAMEWORK
1) Which of the following is the CORRECT option for getting the user whose name is "Raja" and to load
all the roles related to the user eagerly?
.FirstOrDefault();
.FirstOrDefault();
c. var user = [Link]
.FirstOrDefault();
.FirstOrDefault();
a. [Link]
c. [Link]
d. [Link].....................ans
3) Which of the following Entity will create a table with the following specifications:
[key]
[DatabaseGenerated([Link])]
[key]
[key]
a. Eager loading is the process whereby a query for one type of entity also loads related entities as part
of the query.................ans
b. Eager loading is the process whereby a query for one type of entity also load related entities as part of
the query on demand
d. Eager loading is the process of query only the details mapped in the entity
b. False
a. Materialization is the process of returning queries back to the client as CLR types...................ans
b. Materialization is the process of returning query results back to the client as entity types
c. Materialization is the process of returning query results back to the client as CLR types
b. II and III
c. I and III
d. I and II
Note:
Navigation property should be defined as public, virtual. Context will NOT do lazy loading if the property
is not defined as virtual.
a. True .......................ans
b. False
a. True ...................ans
b. False
b. [Link] = false;...........................ans
c. [Link] = true;
d. [Link] = true.
12) which of the following object is used to track changes, manage entities, concurrency and
relationship of the entities?
a. DbContext
b. EntityDataModel....................ans
c. Entity
13) [Link] Property Provides access to features of the context that deal with change
tracking of entities. State True or False.
a. True................ans
b. False
14) Which of the following snippet creates database in local sql express by default?
}
II. public class Context: DbContext
b. I and II
c. I and III----ans
d. II and III
15) In foreign key association when the relationship changed, the Entity state of the dependent object
will change to [Link] from [Link].
a. True.................ans
b. False
16) Which of the following is the default database initializer in Entity framework?(default initializer)
a. CreateDatabaseIfNotExists........................ans
b. DropCreateDatabaseAlways----ans
c. DropCreateDatabaseIfModelChanges----ans
d. DropDatabaseAlways
17) Which of the following is CORRECT for the sql implementation of the below linq query from s in
[Link] from c in [Link] where [Link] == 1 select new {[Link],c}
a. SELECT
[Extent1].[StudentId]AS[StudentID],
[Extent1].[StudentName]AS[StudentName],
[Join1].[CourseId1]AS[CourseId],
[Join1].[CourseName]As[CouseName],
[Join1].[Location]As[Location],
[Join1].[TeacherId]AS[TeacherId]
FROM [dbo].[Student]AS[Extent1]
INNER JOIN
(SELECT[Extent2].[StudentId]AS[StudentId],[Extent3].[CourseId]AS[CourseId1],[Extent3].[CourseName]A
S[CourseName],[Extent3].[Location]AS[Location],[Extent3].[TeacherId]AS[TeacherId]
FROM [dbo].[StudentCourse]AS[Extent2]
WHERE 1 = [Extent1].[StandardID]
[Link]
[Extent1].[StudentId]AS[StudentID],
[Extent1].[StudentName]AS[StudentName],
[Join1].[CourseId1]AS[CourseId],
[Join1].[CourseName]As[CouseName],
[Join1].[Location]As[Location],
[Join1].[TeacherId]AS[TeacherId]
FROM [dbo].[Student]AS[Extent1]
INNER JOIN
(SELECT[Extent2].[StudentId]AS[StudentId],[Extent3].[CourseId]AS[CourseId1].[Extent3].[CourseName]
[Join1].[CourseId1]AS[CourseId],
[Join1].[CourseName]AS[CouseName],
[Join1].[Location]As[Location],
[Join1].[TeacherId]AS[TeacherId]
FROM [dbo].[Student]AS[Extent1]
INNER JOIN
(SELECT[Extent2].[StudentId]AS[StudentId],[Extent3].[CourseId]AS[CourseId1],[Extent3].[CourseName]A
S[CourseName],[Extent3].[Location]AS[Location],[Extent3].[TeacherId]AS[TeacherId]
FROM [dbo].[StudentCourse]AS[Extent2]
WHERE 1 = [Extent1].[StandardID]
d. SELECT
[Extent1].[StudentId]AS[StudentID],
[Extent1].[StudentName]AS[StudentName],
[Join1].[CourseId1]AS[CourseId],
[Join1].[CourseName]As[CouseName],
[Join1].[Location]As[Location],
[Join1].[TeacherId]AS[TeacherId]
FROM [dbo].[Student]AS[Extent1]
Group by
(SELECT[Extent2].[StudentId]AS[StudentId],[Extent3].[CourseId]AS[CourseId1],[Extent3].[CourseName]A
S[CourseName],[Extent3].[Location]AS[Location],[Extent3].[TeacherId]AS[TeacherId]
FROM [dbo].[StudentCourse]AS[Extent2]
WHERE 1 = [Extent1].[StandardID]
18) Eager loading returns all of the objects including the related objects. State True or False.
a. True----ans
b. False
a. ForeignKey
b. Model
c. Column.......................ans
d. Entity
a. Mapping manual
b. static
c. virtual............ans
d. proxy
22) Which of the followings are database initialization strategies in EF Code First?
a. CustomDBInitializer................ans
b. CreateDatabaseIfNotExists...........ans
c. MigrateDatabaseToLatestVersion
d. AlterDatabasewithchanges
23) If we use database first generation a DbContext is generated by default. State True or False
a. True...............ans
b. False
24) By default, the Entity Framework will generate the database queries and update commands when
your code interacts with the model. State True or False.
a. True ................ans
b. False
25) Which method in the DBContext writes inserts, updates, and deletes to the data source?
a. SaveChanges.........................ans
c. Save
d. SaveEntity
26) Linq to Entity Query results are usually returned as which of the following?
a. Linq to objects
b. A collection of zero or more typed entity objects or a projection of complex types defined in the
conceptual model.............ans
d. Anonymous types...............ans
e. Inline collections..................ans
After a LINQ to Entities query is converted to command trees and executed, the query results are usually
returned as one of the following:
A collection of zero or more typed entity objects or a projection of complex types in the conceptual
model.
Inline collections.
Anonymous types.
27) Which of the following is used to define plain old CLR Objects that are NoT related to certain
persistence technology?
a. Persistence Ignorance..............ans
c. Self-Tracking Entities
d. Deferred or Lazy Loading
The DataRelation object is used to add relationship between two DataTable objects. What are ...
Persistence Ignorance -
Facilitates you to define your own Plain Old CLR Objects (POCO)
a. [Link] = false;................ans
b. [Link] = false;
c. [Link] = false;
d. [Link] = false;
29) Which of the following class is used to programmatically create connection string and parse existing
connecting string to create attributes and methods for the class?
a. EntityConnectionStringBuilder.................ans
b. EntityClientProvider
c. EntityContext
d. EntityConnection
[Link] = 1000;
[Link]();
b. NorthwindEntities dbContext = new NorthwindEntities();
[Link] = 1000;
[Link]();
[Link] = 1000;
[Link]();
[Link] = 1000;
[Link]();
[Link] to dataset.....................ans
[Link] of these
[Link] TO SQL
[Link] TO XML
32.a POCO class will not be inherited from entity object class
[Link].....................ans
[Link]
[Link] model provides the normalised schema designed by the database administrator
state true or false
a. true
[Link]
[Link] you use the using statement,then compiler automatically creates a try/finally block and calls
dispose in the finally block.
[Link]....................ans
[Link]
[Link] of the following property is used to map two seperate types in the storage model?
select one
[Link] entity...................ans
[Link] property
[Link]
[Link] of these
Note:scalar property:A property of an entity that maps to a single field in the storage model
split entity:An entity type that is mapped to two separate types in the storage model.
[Link] namespace is used to include .net data provider for sql server?
[Link]
[Link]
[Link]
[Link]....................ans
select one
[Link] of these
Note:
POCO Entities
POCO stands for "plain-old" CLR objects which can be used as existing domain objects with your data
model.
POCO data classes which are mapped to entities are defined in a data model.
It also supports most of the same query, insert, update, and delete behaviors as entity types that are
generated by the Entity Data Model tools.
You can use the POCO template to generate persistence-ignorant entity types from a conceptual model.
a. true
[Link]
Note:The Entity Framework even supports mapping entities in the conceptual model to stored
procedures in the data source.
[Link] the foreign key columns are not included in the model,the association information is
managedas an independent object
[Link]......................ans
[Link]
[Link] framework supports automatic change tracking of the loaded entities during the life time of
the context
[Link]...........................ans
[Link]
select one
[Link] of these
select one
a.[remove]
b.[ignored]
c.[notmapped]..........................ans
[Link] of these
[Link] an entity framework application data is loaded from the file with the [Link]
[Link] entity framework uses the metadata in the mapping types to translate queries against the
conceptual model to data source specific commands
select one:
b.I & II
select one:
[Link]
[Link]
[Link]..............................ans
[Link]
Note:
SaveChanges can generate an UpdateException when an object added to the ObjectContext cannot be
successfully created in the data source.
This can happen if a row with the foreign key specified by the relationship already exists
select one:
(ans) [Link] expressions in the query might be executed on the server and some parts might be
executed locally on the [Link]-side evaluaion of an expression takes place before the query is
executed on the server...................ans
[Link] expressions in the query might be executed on the server and some parts might be executed
locally on the [Link]-side evaluaion of an expression takes place before the query is executed on
the server.
[Link] of these
[Link] expressions in the query might be executed on the server and some parts might be executed
locally on the [Link]-side evaluaion of an expression takes place before the query is executed on
the server.
[Link] of the following annotation validates property whether it has minimum length of the array or
string?
select one:
[Link] of these
[Link]
[Link]...........................ans
[Link]
[Link] splitting enables which of the following?
select one:
select one:
[Link] ____________ class supports both LINQ to entities and entitySQL queries against a conceptual
model.
select one:
[Link]..............................ans(may be)
[Link] of these
[Link]
[Link]
select one:
[Link] change a foreign key association that includes overlapping keys,it is recommend to modify the
foreign key values instead of using the object references.
[Link] keys are composite keys where some properties in the key are also part of another key in
the entity
[Link] of these.............................................................ans
[Link] of the following annotation is used to mark one or more properties to be used for concurrency
checking while user modifies in an entity?
select one:
[Link]......................ans
[Link] of these
[Link]
[Link]
[Link] class is responsible for interacting data as object in the entity framework?
select one:
[Link]
[Link]
[Link]
[Link]........................ans
select one:
[Link] properties provide a way to navigate an association between two entity types.
[Link] object can have a navigation property for every relationship in which it participates.
[Link] properties allow you to navigate and manage relationships in both directions,returning
either a reference object(if the multiplicity is either one or zero-or-0ne)or collection(if the multiplicity is
many)
[Link] of these.................ans
[Link] annotation is used when you have multiple relationships between classes?
select one:
[Link]
[Link]
[Link] key
[Link] property.......................ans
select one:
[Link].................................ans(may be)
[Link]
select one:
[Link]
[Link]()
[Link] of these
d.((lobjectcontextadaptor)db).objectcontext;.......................ans
select one:
[Link] the correct code to execute sql raw query in the entity frameqwork from the following
select one:
[Link] of these
varstudentlist = [Link]("select*from
student").tolist<student>();...............................ans
[Link] compiled query class provides compilation and caching of queries for reuse
[Link] the query is compiled you can only supply parameters of primitive type but you cannot replace
parts of the query that would change the generated SQL.
select one:
d.I & II
[Link] of the following provider is used to access data in the conceptual model?
select one:
[Link]
[Link]
*************************************************************************************
************************************************************************
a)text------------ans
b)ntext------------------ans
c)integer
d)image---------------------ans
e)cursor-------------ans
a)entitydatareader--------------ans
b)Dbcontext
c)objectcontext
d)entityconnection
3)which of the following is the ability to add and use your own data classes along
a)entityobject
b)[Link]-------------------------------ANS
c)poco
d)none
4)razor syntax have intellisense
true or false
true------ans
d)they frequently used with the group by clause of the select statement------ans
e)they cannot be used with the group by clause of the select statement
a)allow access only to external assemblies with minimal access to internal computation
c)allow access to external system resource such as files,networks and environment variables----------------
ans
only 1
only 2
8)if we want to create a backward compatible application which of the following view engine will be
preferred in mvc3?
a)sparx
b)aspx
c)razor------ans
d)Nhaml
a)specifies that the DML trigger is executed instead of the triggering sql statement
return view();
only 1--------------------------------------------------ANS
only 2
both 1 and 2
none
a)use clustered index when a query returns a range of values by using operators such as between
>,>=,<,<=-----------ans
b)use clustered index when a query returns largs resultsets----------------ans
12)The _______________class supports both linq to entities sql queries agaimst a conceptual model
a)sqlquery
b)objectquery-------------------ans
c)entitytosql
d)none
a)red-green-refractor----------------------------------------------------ANS
b)unit debug
c)unit test
d)regression test
a)the entity framework lifetime of the context begins when the instance is created and ends when the
instance is either disposed or garbage collected----------------------ans
c)the primary class that is responsible for interacting with data as objects is
[Link]------ans
d)dB ENTITY PROPERTIES repersent collections of the specified entites in the context
true or false
ANS:true
16)what is the significance of the results apne of the query designer?
b)it shows the results of the most recently executed select query-----ans
d)you can modify the database by editing values in the cells of the grid--ans
true or false
true-----ans
A)2 ONLY
B)BOTH
C)NONE
D)1 ONLY---------------------ANS
19)which of the following two are name types of sql server files?
a)physical_file_name
b)logical_file_name------------ans
c)primary_file_name
d)os_file_name-------ans
20)i have a table blog which i want to split into two [Link] of the followin is the correct snippet?
a)protected override void OnModelCreating(DbModelBuilder
modelBuilder){[Link]<Blog>().HasRequired(e=>[Link]).WithRequiredPrincipal();mod
[Link]<Blog>().ToTable("Blogs");[Link]<BlogAbout>().ToTable("Blogs");}
[Link] profiling
[Link] Regeneration
[Link] updation
[Link] caching---------ans
[Link] SERVER
[Link] ENCRYPTION
[Link] AS----------ans
[Link] OF
[Link]=false;
[Link]=false;
[Link]=false;
[Link]=false;-----------ans
[Link] of the package can be used to write an implementation for [Link] Identity
that targets different persistence stores such as Azure Table [Link] database etc
[Link] [Link]
[Link] security
[Link] [Link]---------ans
[Link] [Link]
[Link] declares a conceptual model,storage model and mapping between these models
Select one:
a.I and II
b. II and III
c. I and III
[Link] dont want to allow anyone to do any change to the code being deployed on
[Link] have a certain number of products with price ranging from high to low to medium. You
want to filter products by their respective price [Link] of the following option
@using([Link]("index","Range"))
[Link]("Product",new selectList([Link]))
...]
b.[...
@using([Link]("index","Product"))
[Link]("Range",new selectList([Link]))
...]
c.[...
@using([Link]("index","Product"))
[Link]("Range",new selectList([Link]))
...]
d.[... ------------------------------------------------------------------ANS
@using([Link]("index","Product"))
[Link]("Range",new selectList([Link]))
...]
[Link] are given a task by your manager that includes assembly binding. Which file
[Link]
[Link]
[Link]------------------------------------ANS
[Link]
[Link] index on the column ,or columns is automatically created which is by default nonclustered
[Link] index on the column ,or columns is automatically created which is by default clustered-----------
-----------ANS
[Link] index on the column ,or columns is automatically created which is by default spatial
[Link] index on the column ,or columns is automatically created which is by default XML
[Link] of the following keyword is used for lazy loading related data in entity framework?
[Link]
[Link]----------------------ANS
[Link]
[Link]
a.a collection of compiled T-SQL commands that are directly accessible by SQL SERVER -----------------------
-----ans
B.A COLLECTION of commands written in any base .net language that are directly
b. delete package
[Link] packagename
[Link] a unit test to check whether the participant A1 has covered half the ditance of total
a.[TestMethod]
int total_distance=2;
int distance_covered=10;
int distance_left=10;
[Link](distance_covered);
int Left=[Link];
[Link](distance_left,Left);
b.[TestMethod]
int total_distance=2;
int distance_covered=10;
int distance_left=10;
[Link](distance_covered);
int Left=d1@remaining;
[Link](distance_left,Left);
d.[TestMethod]
int total_distance=2;
int distance_covered=10;
int distance_left=10;
[Link](distance_covered);
int Left1=[Link];
[Link](distance_left,Left);
[Link] ---------------------------------------------------------------------------ans
[Link]
35.
[Link] class is used to execute an entity SQL command against an entity mode?
[Link] ---------------------------------------------------------------------------ans
[Link]
[Link]
[Link] ---------------------------------------------------------------------------ans
[Link]
[Link]---------------------------------------------------------------------------ans
[Link]
[Link] server 2008 security model is based on three categories that seperate
the basic elements of [Link] among the following are those?(Multiple ans)
[Link] ---------------------------------------------------------------------------ans
[Link]
[Link] ---------------------------------------------------------------------------ans
[Link] ---------------------------------------------------------------------------ans
[Link] is the support for XML integrated into SQL server?(multiple ans)
[Link] to specify an XQuery against XML data stored in columns and variables of the xml type------------
--------ans
Q.41 which of the following is the default database iitializer in entity framework?
a CreateDatababaseifnotexists ---------------------------------------------------------------------------ans
b DropCreateDatabaseifModelChanges
c DropCreateDtabaseAlways
d DropDtabaseAlways
a [Link] ---------------------------------------------------------------------------ans
b [Link]
c [Link]
a True
b False
Q.44 Which of the following statements are true about Clustered index?
a A Clustered index sorts and stores the data rows of the table or view in order based on the
b A Clustered index sorts and stores the data columns of the table or view in order based on the
Q.45 Entity Framework provide us with which of thefollowing attribute to indicate multiple relationships
a [InsertProperty]
b [InverseProperty]-------------------ans
c [InProperty]
a True
b False-------------------ans
Q.47 Which of the following method of the ObjectStateManager is used to get Object State entry?
a TryGetObjectStateEntry
b ChangeObjectState -------------------ans
c GetRelationshipManager
d ChangeRelationshipState
a True-------------------ans
b False
Q.49 [Link](new SampleFilter()); - What will the above piece of code do?
Q.50 Repeated
Q.52 Read the description & identify which method it belongs to.:-"Initializes a new instance of the
HtmlHelper class by using
a [Link](|ViewContext viewContext,ViewDataContainer
viewDataContainer,RouteCollection routeCollection)
b [Link](ViewContext viewContext,|ViewDataContainer
viewDataContainer,RouteCollection routeCollection)-------------------ans
d [Link](@viewContext,@viewDataContainer,@routeCollection)
b RediredtToAction-------------------ans
c ForwardTo
d ActionRedirect
Q.55 Read the Followinfdefinition and choose the correct option ----" Contains methods to create types
of objects locally or
b Dependency Resolver
c Activator-------------------ans
d Validator
q.56 Which of the following class is used to programmatically create connection string and parse existing
connecting string
a EntityConnection
b EntityClientProvider
c EntityConnectionStringBuilder -------------------ans
d EntityContext
a focus()-------------------ans
b mouseenter()-------------------ans
c on()-------------------ans
d hover()-------------------ans
a Maybe
b Yes-------------------ans
c no
a Distinct
b Except
c GroupBy
Q.60 You are handling page ofan event. Now the content and information you have cached so that it is
loading quickly but you
need to keep the clock which shows time for the event dynamic. which of the following will be
helpful?
a <%DateTime([Link]);%)
b <%[Link](t=>[Link]());%> -------------------ans