0% found this document useful (0 votes)
201 views

Ef, SQL

The document discusses various methods related to Entity Framework relationships and ObjectStateManager. It provides examples of different relationship mapping types in Entity Framework and the correct method to get the ObjectStateEntry for a given object. It also discusses role-based access control as the likely reason one user is able to access a page but another is not.

Uploaded by

mayur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
201 views

Ef, SQL

The document discusses various methods related to Entity Framework relationships and ObjectStateManager. It provides examples of different relationship mapping types in Entity Framework and the correct method to get the ObjectStateEntry for a given object. It also discusses role-based access control as the likely reason one user is able to access a page but another is not.

Uploaded by

mayur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 277

which of the following method is used to get correct type for the specified target role in a relationship in

the class relationshipmanager?

select one:

a.GetRelated End-----wrong ans

b.getRelatedCollection --------------------------------------------------- crct ANS

c.GetObjectstateEntries

d.None

---------------------------------------------------------------------------------

Q.47 Which of the following method of the ObjectStateManager is used to get Object State entry?

a TryGetObjectStateEntry -------------- correct ans

b ChangeObjectState -------------------ans (wrong)

c GetRelationshipManager

d ChangeRelationshipState

------------------------------------------------------------------------------------------

JASBIR

1)natasha is trying to access a page but she is not able to do it.

on the other hand when john logged in via his credentials he could .what may be the reason?

a)webserver credential overriding

b)role based access------- ANS

c)url cutomization
d)account rendering

------------------------------------------------------------------------------------------------------------------------------------------
--------------

2) LINQ stands for

ans) Language integrated query

------------------------------------------------------------------------------------------------------------------------------------------
---------------------------

3)if foreign key coloumns are not available in the model , the relationship are reffered with the object
references instead of

foreign key properties .what is the association called??

a)independent association --------ans

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

------------------------------------------------------------------------------------------------------------------------------------------
--------------

5)a query is an expression that retrieves data from a data source?

true ----------------ans

false

------------------------------------------------------------------------------------------------------------------------------------------
--------------

6)for any injection ,we use

a)[inject]

b)none -----------------ANS

c) [injection creato]

d) [inject initialze]

------------------------------------------------------------------------------------------------------------------------------------------
--------------
7)which of the following is not a HtmlHelper?

a)LabelFor

b)EditorFor

c)ValidationMessageFor

d)None of the listed options--------------ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

8)how can we disable proxy object creation in POCO?

A) CONTEXT.CONTEXTOPTIONS.ENABLED = FALSE;

B)CONTEXT.CONTEXTOPTIONS.PROXY=FALSE;

A) CONTEXT.CONTEXTOPTIONS.PROXYENABLED = FALSE;

B)CONTEXT.CONTEXTOPTIONS.PROXYCREATIONENABLED = FALSE;---------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

9)SaveChanges() will be raised exception when which of the following object is added to the

objectcontext and it cannot be successfully created in the data source?

a)DbException

b)Savexception

c)ChangeException

d)UpdateException-------------ans
------------------------------------------------------------------------------------------------------------------------------------------
--------------

10)Activator class cannot be inherited?

true--------answer

false

------------------------------------------------------------------------------------------------------------------------------------------
--------------

11)which of the following class object is used for manipulatiing entity and trigger the changes while
insert

,delete and update on the entity?

a) DbContext -----------ans

b) DataContext

c)MOdel-defined Functions

d) None

------------------------------------------------------------------------------------------------------------------------------------------
--------------

12)_____________is an xml-based language which describes the entities, functions and relationships
which create a conceptual model of an application?

a) conceptual schema definition language--------------ans

13)Which of the following mapping is supported by Fluent Api?

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

d) the default is partial which provides the greatest level of recovery

------------------------------------------------------------------------------------------------------------------------------------------
--------------

15)Which statements are true about rank function?

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

d)the rank function returns consecutive integers

e) the rank function does not always return consecutive integers----------ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

16) In application page. you are supposed to take details from a user but you to make sure that the user
doesn't leave this space blank. Which of the following will accomplish this objective?
a. [Required]

public Pricate string Details{get;set;}

b. [Required]

public virtual string Details{get;set;}-----------------Ans

c. [Must]

public virtual string Details{get;set;}

d. [Must]

public virtual int Details{get;set;}

------------------------------------------------------------------------------------------------------------------------------------------
--------------

17) Which of the following option is CORRECT to select only the coulumns StudentName, Department
and GroupName from the student entity of the student name "Kishore"?

a. from s in ctx.Students where s.StudentName == "Kishore" select new { s.StudentName,


s.DepartmentName, s.GroupName };-----------------Ans

b. from s in ctx.Students where s.StudentName == "Kishore" where new { s.StudentName,


s.DepartmentName, s.GroupName };

c. from s in ctx.Students where s.StudentName == "Kishore" include new { s.StudentName,


s.DepartmentName, s.GroupName };

d. None of the listed options

------------------------------------------------------------------------------------------------------------------------------------------
--------------
18)which of the following should you to choose to activate buildview property in asp.net?

ans) <MvcBuildViews>true</MvcBuildViews>

------------------------------------------------------------------------------------------------------------------------------------------
--------------

19)which of the foolowing is the full for for ssdl

ans)Store Schema Definition Language

------------------------------------------------------------------------------------------------------------------------------------------
--------------

20)dependencyresolver() is destructor?

ans)false

------------------------------------------------------------------------------------------------------------------------------------------
--------------

21)how is the data of partition tables managed?

(a)The data of partioned tables and indexes is divided into units .......ans

(b) the data is partitioned horizontally,...........ans

(d) The table or index is treated as single logical entity.---ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

22) Your manager has given you a task. It reads as follows:- the product list should be shown and when
the user clicks on the product name it should Show it's details. Do it without Using Json.

Which of the following would you choose?

a. $(function(){ var service=new ProductService();

service.GetInstructorNames(function(result){${result).each(function(result)

{$("<option>").val(this.ID).text(this.Name) .appendTo("#productSelect");});});-----------------Ans
b. $("#productSelect").change(function(){ var val=$("#productSelect").val() if(parseInt(val)){ var
service=nes ProductService(); service.GetProductDetails(val.function(data)) {var list=("<ul></ul>");
$(data.Facts).each(function(){$("<li>"+this+"</li>").appendTo(list);}); $("productShow").html(list); }); }
else { $("#productShow").html("");} });

c. $("#productSelect").change(function(){ var val=$("#productSelect").val() if(parseInt(val)){ var


service=nes ProductService(); service.GetProductDetails(val.function(data)) {var list=("<ul></ul>");
$(data.Facts).each(function(){$("<li>"+this+"</li>").dependTo(list);}); $("productShow").html(list); }); }
else { $("#productShow").html("");} });

d. $(function(){ var service=new ProductService();

service.GetInstructorNames(function(result){${result).each(function(result)

{$("<option>").val(this.ID).text(this.Name) .appendTo("#productSelect");});

------------------------------------------------------------------------------------------------------------------------------------------
--------------

23) Which of the following Entity will create a table with the following specifications:

I. It should have FirstName and should be required

II. It should have LastName and should be Required

III. Full Name must be FirstName LastName

IV. EmployeeID should be primary key

V. It should have DepartmentID

VI. Department Entity should be lazy loading

a. public class Employee

b. public class Employee{ public string EmployeeId {get;set;} public string FirstName {get;set;} public
string FullName {get;set;}public string DepartmentId{get;set;} public Department Department{get;set;}}

c. public class Employee{[key]public string EmployeeId{get;set;}public string FirstName


{get;set;}[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
public string FullName { get{ return FirstName +"."+ LastName; }} public string DepartmentID{get;set;)
public virtual Department Department{get;set;}}-----------------Ans

d. public class Employee{ [key] public string EmployeeId {get;set;} public string FirstName {get;set;}
public string FullName {get;set;}public string DepartmentId{get;set;} public Department
Department{get;set;}}

e. public class Employee{[key]public string EmployeeId{get;set;}public string FirstName


{get;set;}[DatabaseGenerated]public string FullName { get{ return FirstName +"."+ LastName; }} public
string DepartmentID{get;set;) public Department Department{get;set;}}

------------------------------------------------------------------------------------------------------------------------------------------
--------------

24. You have to validate project name from the company database.-Which of the following will be
helpful?//hold

a. public string Pname{ get; set;}

[Remote ("CheckPname"."Home"."Error Message="Name not there")]

public JavaResult CheckPname (string Pname)

{/* validation code*/}

return Java(result,JsonRequestBehavior.AllowGet);

b. public string Pname{ get; set;}

[Compare ("CheckPname"."Home"."Error Message="Name not there")]

public JsonResult CheckPname (string Pname)

{/* validation code*/}

return Json(result,JsonRequestBehavior.AllowGet);------------------------Ans

c. public string Pname{ get; set;}

[Remote ("CheckPname"."Home"."Error Message="Name not there")]


public JsonResult CheckPname (string Pname)

{/* validation code*/}

return Json(Pname,JsonRequestBehavior.DenyGet);

d. public string Pname{ get; set;}

[Remote ("CheckPname"."Home"."Error Message="Name not there")]

public JsonResult CheckPname (string Pname)

{/* validation code*/}

return Json(result,JsonRequestBehavior.AllowGet);

------------------------------------------------------------------------------------------------------------------------------------------
--------------

25)which statements are true about large clr user defined types?

(a) Extend exisiting SQL Server Type Sysytem.--------------ans

(c)Allow you to store CLR objects in SQL Server Database.------------ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

26)how can we delete the database on the database server if it exists?

ans)Delete(DbConnection)

------------------------------------------------------------------------------------------------------------------------------------------
--------------

27. Which of the following code can be used as an option for partial view through child request?

a. Part [email protected]("Sampleone","Feedback")

Part 2= [ChildActionOnly]

public ActionResult Sample_one()

{*..some code..*}
b. Part [email protected]("Sampleone","Feedback")

Part 2= [ChildAction]

public ActionResult Sample_one()

{*..some code..*}

c. Part [email protected]("Sample_one","Feedback")

Part 2= [ChildActionOnly]

public ActionResult Sample_one()

{*..some code..*}------------------------------------------------------Ans

d. Part [email protected]("Sampleone","Feedback")

Part 2= [ChildAction]

public ActionResult Sample_one()

{*..some code..*}

------------------------------------------------------------------------------------------------------------------------------------------
--------------

28)which one of the following are the properties of the HTTPcONFIGURATION CLASS?

a) Dependency Resolver--ans

(c) Mesaage Handlers--ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

29)choose handle error attribute globaly

(b) All of the listed options-ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

30)DbContext does not support comiled queries?

true-----------ans
------------------------------------------------------------------------------------------------------------------------------------------
--------------

31)How can we set primary key explicitly for an entity?//Hold

a.ModelBuilder.CreateKey<Entity>(t=>t.KeyColumnYouWant);

b.ModelBuilder.Entity<Entity>().HasKey(t=>t.KeyColumnyouWant);-----------------------ans

c.ModelBuilder.Key<Entity>(t=>t.KeyColumnYouWant);

d.None of the listed options.--

------------------------------------------------------------------------------------------------------------------------------------------
--------------

32)In Lazy loading,the navigation property has to be declared as:

a.static

b.public-----------------------------------Ans

c.proxy

d.virtual----------------------------------Ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

33)Which statements are true about CLR stored procedures?

a.It is a reference to a Microsoft.NET Framework common language runtime(CLR)method.-------------------


---------Ans

b.The method can take and return user-supplied parameters.------------------------------------------------------


Ans

c.The method can only take input parameters.

d.They are implemented as public,static methods on a class in a .NET Framework assembly.-----------------


--------Ans

e.They are implemented as private,protected methods on a .NET Framework assembly.

------------------------------------------------------------------------------------------------------------------------------------------
--------------
34)What are the benefits of using a Unique index?

a.It is less error prone.

b.Data integrity of the defined columns is ensured.------------------------------------------------------Ans

c.Additional information helpful to the query optimizer is provided.-------------------------------------Ans

d.The performance is not degraded.-----------------------------------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

35)SQL Server consists of which of the following three types of files?

a.Primary data files--------------------Ans

b.Secondary data files------------------Ans

c.Hidden files

d.Log files-----------------------------Ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

36)Which of the following is not the Design goal of ASP.NET MVC3? //hold ans should be none of the
listed as it asks for not goal

i.Embrace the Web

ii.Testable

a.ii only--------------------------------Ans

b.Both i and ii

c.None of the listed options

d.i only

------------------------------------------------------------------------------------------------------------------------------------------
--------------

37)What are the limitations of Ownership chaining?

a.Applies only to DML statements:SELECT,INSERT,UPDATE and DELETE.----------------------------Ans

b.The owners of the caliing and the called objects must be the same.-------------------------Ans
c.The owners of the calling and the called objects must be different.

d.Does not apply to dynamic queries inside the module.--------------------------------------Ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

38)What does the following syntax do?

CREATE TABLE T1(Col1 int primary key,Col2 xml)

a.It creates a row in a table.

b.It creates a column of type int in the table & sets it as a primary key.----------------Ans

c.It creates a column of type xml.--------------------------------------------------------Ans

d.It creates an empty table.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

39)Partial page rendering does which of the following?

a.Removes the need for the whole page to be refreshed as the result of a HTTPGet.

b.Removes the need for the whole page to be refreshed as the result of a postback.---------------Ans

c.Only header of the page that have changed are updated.

d.Only individual regions of the page that have changed are updated.-----------------------------Ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

40)How are user defined functions different from User-defined Stored Procedures?

a.In user-defined function the default parameter is specified with a DEFAULT keyword.------------ans

b.In User-defined function omitting the parameter also implies default value.

c.User-defined functions do not support output parameters.---------------------------------Ans

d.User-defined functions do support output parameters.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

41)Which of the following is used to provide short expression for querying entities over linq?

a.LINQ to DataSet.
b.LINQ to SQL.

c.Lambda expression.--------ans

d.None of the listed options

------------------------------------------------------------------------------------------------------------------------------------------
--------------

42)Which of the following approach do we avoid working with the visual designer or entity framework?

a.Code First Approach.----------------a

b.Model First Approach.

c.Database Approach.

d.None of the listed options.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

43)Novak is a given a task by his manager to strictly load a particular image only after page gets
loaded.What will you advice him to do?

i.Tell him to use JavaScript.

ii.Tell him to combine OnLoad function with JavaScript.

iii.Tell him to use AfterLoad function with JavaScript.

a.i and ii--------------------ans

b.ii and iii

c.i and iii

d.i,ii,iii

------------------------------------------------------------------------------------------------------------------------------------------
--------------

44)In console window,PM stands for _________

a.Project Manager.

b.Package Manager.-----------------Ans

c.Package Model.

d.Priority Manager.
------------------------------------------------------------------------------------------------------------------------------------------
--------------

45)Which statements are true about the GROUPING function?

a.It 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

b.It 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.

c.It 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

d.It 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.

e.Grouping is allowed only in the select list associated with a GROUP BY clause that contains either the
CUBE or RoLLUP operator. ------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

46.by default, the entry framework will generate the database

queries and update commands when your code interacts with the model?

Ans:True

------------------------------------------------------------------------------------------------------------------------------------------
--------------

47.entity is defined as _______ of the object, but not the behavior of the object?(QUES NOT CLEAR)

a.Object

b.Schema--------------ANS

c.Entity

d.None

------------------------------------------------------------------------------------------------------------------------------------------
--------------

48.Entity framework is an open source framework? True or false


Ans:True

------------------------------------------------------------------------------------------------------------------------------------------
--------------

49.In an application page, you are suppose to take students % between 40-80.

which of the following will accomplish this objective?

select one

a.[Range (40,80)]

public virtual int Perc{get;set;} -----------------Ans

b.[between (40;80)]

public virtual int Perc{get;set;}

c.[Range (40,80)]

public virtual string Perc{get;set;}

d.[Range (40||80)]

public virtual int Perc{get;set;}

50.What kind of data does the XML datatypes store in SQL server? (Multiple ans)

a.Office documents

b.Memory maps

c.XML documents---->ans

ssd.Fragments--->ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

51.What does a cache profile do?//hold

i.Cache profile allows libraries to provide fast output to sql queries

ii.Cache profile avoids repetition in cache attributes

select one:
a.Both i and ii-----ANS

b.i only

c.ii only

d. None of the listed options

------------------------------------------------------------------------------------------------------------------------------------------
--------------

52.Fredrick is carrying out a TDD and is expecting ArgumentOutOfRange exception

but he does not known how to write a code to declare that an exception is expected.

To help him, which of the following would you choose?

select one;

a.[Exception.Expected=ArgumentOutOfRange]

b.[ArgumentOutOfRangeException.Expected]

c.[ExpectedException(typeof(ArgumentOutOfRange))]----->ans

d.[ArgumentOutOfRange.Expected=True]

------------------------------------------------------------------------------------------------------------------------------------------
--------------

53.How are Database-level principles categorized?(Multiple ans)

a.database administrator

b.database user-->ans

c.database role-->ans

d.windows role

e.Application role-->ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

54.In caching,by default the location property have the value___

a.All

b.Any--->ans
c.None

d.Auto

------------------------------------------------------------------------------------------------------------------------------------------
--------------

55.Which of the following is a way to install/download a Nuget in your system?

a.In your browser go to nuget.org-->click on download

b.In a visual studio, right click on references-->Add LibraryPackageReferences-->search nuget-->Install

c.All of the listed options--------------------------------------------------------------------------------ans

d.In visual studio, go to tools-->Extension manager-->search Nuget-->Install

------------------------------------------------------------------------------------------------------------------------------------------
--------------

56.what is meant by Materialization in entity framwork?

Ans:Materialzation is the process of returning query results back to the

client as CLR types

------------------------------------------------------------------------------------------------------------------------------------------
--------------

57.Entity framework support foreign key? t or f

Ans: True

------------------------------------------------------------------------------------------------------------------------------------------
--------------

58.If your are moving your project from MVC2 to MVC3 what will be the

value of "UnobtrusiveJavaScriptEnabled"

a.True--->ans

b.None

c.False

d.Auto
59.We can write raw sql query in SQLQuery() method in entity framework? T or F

Ans:true

------------------------------------------------------------------------------------------------------------------------------------------
--------------

60.Which namespace is used to handle EntityClient provider?

a. System.Data.EntityClient--->ans

b.System.Transactions

c.system.data.annotations

d.None of the listed options

*************************************************************************************
***********************************************

ajith

1. Which of the following require type-casting in the view?

I.ViewData

II.TempData

Select one:

a.I only

b.II only

c.Both I and II-------------------------------------------------------ANS

d.None of the listed options

------------------------------------------------------------------------------------------------------------------------------------------
--------------

2. Which of the following snippet creates database in local sql express by default?
I.public class Context:DbContext

public Context():base()

II.public class Context:DbContext

public Context():base("DB Name")

Select one:

ans:2&3

------------------------------------------------------------------------------------------------------------------------------------------
--------------

3. How is a User-defined table-valued function in SELECT,INSERT,UPDATE or DELETE statements is


invoked?

Select one:

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 binding.Which file would you configure?

Select one:

a.System.config

b.Web.config

c.Machine.config---------------------------------------------------------------ANS

d.Config.config

------------------------------------------------------------------------------------------------------------------------------------------
--------------

5. Which are the different types of file groups?

Select one or more:

a.Secondary

b.Primary----------------------------------------ANS

c.User-defined-------------------------------------------ANS

d.Hidden

------------------------------------------------------------------------------------------------------------------------------------------
--------------

6. Model Binder Interface defines

select one
a. the .dll files that are requested for a model binder

b.the interfacae that are required for a model binder

c. the assembly that are required fro a model binder

d.the methods that are required for a model binder-------------------------ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

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

c. It can be used to store large blocks of text----------------ans

d. It can be used to store large image types.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

8. ___________ is an XML based language which describes the entities , functions and relationships
which create a conceptual model of a application.

select one

a. Conceptual schema definition langauage (CSDL)---------------ans

b.Conceptual set definition Languaage(CSDL)

c.Conceptual select definition Language(CSDL)

d.None

------------------------------------------------------------------------------------------------------------------------------------------
--------------

9. Which of the following statements are true about AFTER trigger?

select one

a.AFTER trigger executes after the sattements that triggered it completes-----------------------ans


b.AFTER trigger executes after the last trigger in the queue.

c.If 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.

e.AFTER 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

a.DBSet.FInd

b.DBSet .Remove

C.DBSEt.Attach

d.all---------------------------------------------ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

11) Which one in the following is not included in the configuration hierarchy?

ASP.NET Application sub directory

ASP.NET root directory

root web

IIS

ASP.NET client server sub directory-----------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

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

------------------------------------------------------------------------------------------------------------------------------------------
--------------

14) public void testdate()

distance z = new Distance();

var message = new Sample(z);

Assert.areequal(distance,message,z);

} - analyse the code and identify why it will not work

------------------------------------------------------------------------------------------------------------------------------------------
--------------

15) When a LINQ to Entities is Executed

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

None of the options

------------------------------------------------------------------------------------------------------------------------------------------
--------------

16) which of the following statements are true about varchar data type?

varchar can hold alphanumeric data------------------------------------------------ANS

the storage size of varchar datatype is fixed

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

------------------------------------------------------------------------------------------------------------------------------------------
--------------

17) What is meant by materialization in entity framework?

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

None of the options

------------------------------------------------------------------------------------------------------------------------------------------
--------------

18) Partial page rendering does which of the following

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

only header of the page that have changed are updated

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.

public static MvcHtmlString ActionLink(

this AjaxHelper ajaxHelper,

string linkText,

string modelName,

AjaxOptions ajaxOptions)

b.

public static MvcHtmlString ActionLink(

this AjaxHelper ajaxHelper,

string linkText,

string actionName,

AjaxOptions ajaxOptions;

c.-----------------------------ANS

public static MvcHtmlString ActionLink(

this AjaxHelper ajaxHelper,

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>

car information: @View.carinfo

</p>

b.

<p>

car information: @ViewBag{carinfo}

</p>

c.

<p>

car information: @ViewBag.display(carinfo)

</p>

d.---------------------------------------------- ANS

<p>

car information: @ViewBag.carinfo

</p>

------------------------------------------------------------------------------------------------------------------------------------------
--------------

21) Which of the following option is correct about Navigation Property

Navigation properties provide a way to navigate an assiciation between two entity types

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

All of the options------------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

22) IObjectContextAdapter Interface is used to:

get the reference of ObjectContext from object

get the reference of ObjectContext from entity

get the reference of ObjectContext from DBModel

get the reference of ObjectContext from DBContext-----------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

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)

None of the options

------------------------------------------------------------------------------------------------------------------------------------------
--------------

24) analyse the link:- "http://localhost/music/". Choose the option which is correct for it

I. Not running under cassini

II. running under IIS

I only

II only
both I and II --------------------------------------------------------------------------------------------ANS

none of the options

------------------------------------------------------------------------------------------------------------------------------------------
--------------

25) Which of the following model is used to defined application specific object

Entity Data Model-------------ANS

SqlDataModel

ObjectModel

None of the Options

------------------------------------------------------------------------------------------------------------------------------------------
--------------

26. What are the different classes into which the SQL server divides principles?

select one or more

a. windows-level principle-------------------------------ANS

b. field-level principle

c. database-level principle------------------------------ANS

d. SQL Server- level principle---------------------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

27. LINQ stands for

select one

a. Line Integrated Query

b. Line Integrated New Query

c. Language Integrated New Query

d. Language Integrated Query-------------------------------------------------------------------------------ANS


------------------------------------------------------------------------------------------------------------------------------------------
--------------

28. How can the execution plan of queries on partitioned tables and indexes be examined?

Select one or more

a. By using the Transact –SQL SET SHOWPLAN_XML------------------------------------------------------ANS

b. By using the Transact –SQL SET STATISTICS_XML----------------------------------------------------ANS

c. By using the Transact –SQL SET PARTITION_XML

d. By using the Transact –SQL SET INDEX_XML

------------------------------------------------------------------------------------------------------------------------------------------
--------------

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

a. <% using (Html.BeginForm()) {%><%= Html.AntiXssLibrary()%}

b. <% using (Html.BeginForm()) {%><%= Html.AntiForgaryToken()%}-----------------------------------------


----------ANS

c. <% using (Html.BeginForm()) {%><%= Html.AntiCSRFToken()%}

d. <% using (Html.BeginForm()) {%><%= Html.AntiCSRFLibrary()%}

------------------------------------------------------------------------------------------------------------------------------------------
--------------

30. Which of the following is true in doing DB initialization in config file?

Select one (both a and c are same check once again)

a. <?xml version=”1.0” encoding=”utf-8”?><configuration><appSettings><add


key=”DatabaseInitializerFrTypeBlogDataLayer.BlogDBContext, BlogDataLayer”/></
appSettings></configuration>

b. <?xml version=”1.0” encoding=”utf-8”?><configuration><appSettings><add


key=”DatabaseInitializerFrTypeBlogDataLayer.BlogDBContext, BlogDataLayer”
value=”System.Data.Entity.DropCreateDatabaseAlways`1[[BlogDataLayer.BlogDBContext,
BlogDataLayer]], EntityFramework”/></ appSettings></configuration>---------------------------------------------
--------------------ANS

c. <?xml version=”1.0” encoding=”utf-8”?><configuration><appSettings><add


key=”DatabaseInitializerFrTypeBlogDataLayer.BlogDBContext, BlogDataLayer”/></
appSettings></configuration>

d. <?xml version=”1.0” encoding=”utf-8”?><configuration><appSettings><add


key=”DatabaseInitializerFrTypeBlogDataLayer.BlogDBContext, BlogDataLayer”, value=”Create
Database”/></ appSettings></configuration>

------------------------------------------------------------------------------------------------------------------------------------------
--------------

31. Which of the following statements are true.

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

------------------------------------------------------------------------------------------------------------------------------------------
--------------

32. What do you understand by XSS attack?

Select One

a. Injection of malicious script------------------------------------------------------------------------ANS

b. Injection of class definition

c. Hacking via Browser

d. Hacking through cookies


------------------------------------------------------------------------------------------------------------------------------------------
--------------

33. What are the benefits of using Unique index?

Select one or more

a. It is less error prone

b. Data integrity of the defined column is ensured-----------------------------------------------------ANS

c. Additional information helpful to the query optimizer is provided-----------------------------------ANS

d. The performance is not degraded---------------------------------------------------------------------ANS

[(https://msdn.microsoft.com/en-in/library/ms187019.aspx

Benefits of a Unique Index

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 ensure the data integrity of the defined columns.

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(https://www.asp.net/mvc/mvc3)

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(t.now);%>

b. <%Response.WriteSubstitution(t=>DateTime.Now.ToLongTimeString())%>-------------------------------------
--------------------ANS

c. <% var c = dynamic.DateTime() %>

d. <%session s= new session[“Time”];%>

------------------------------------------------------------------------------------------------------------------------------------------
--------------

36. What is entity Key?

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.

d. All of the listed

------------------------------------------------------------------------------------------------------------------------------------------
--------------

37. Problem Statement- Peter is a web developer and has created a website in ASP.NET 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.

Now as a friend, suggest him to use “ChildAction” through “@HtmlAction”.

Which of the following would he choose?

Select one
a. The solution given by Brock is legitimate

b. Peter should use “@Html.GoThrough” in place of “@HtmelAction”

c. Peter should user “ChildActionOnly” in place of “ChildAction”------------------------ANS

d. Such problem can’t exist

------------------------------------------------------------------------------------------------------------------------------------------
--------------

51) Identify the different types of stored procedures.

a.User-defined stored procedures-Transact SQL & CLR.------------------Ans

b.Compiled Stored Procedures.

c.Extended Stored Procedures.-----------------------------------------Ans

d.System Stored Procedures.-------------------------------------------Ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

52) Which method converts string to HTML Encoded string?

a.HtmlUtility.HttpCode.

b.HtmlUtility.XmEncode.

c.HttpUtility.HtmlEncode.---------------------------------------------Ans

d.HttpUtility.HtmlCode.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

53) Machine.config,contains settings that apply to an entire Network.State true or False.

a.True.

b.False.--------------------------------------------------------------Ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

54) The ObjectContext class is not thread-safe.State True or False.

a.True.---------------------------------------------------------------Ans
b.False.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

55) Which of the package can be used to write an implementation for ASP.NET Identity that targets
different persistence stores such as Azure Table Storage,NoSQL databases etc.?

a.Microsoft.AspNet.Identity.Core.-------------------------------------Ans

b.Microsoft.AspNet.Identity.EntityFramework.

c.Microsoft.AspNet.Identity.OWIN

d.Microsoft.ASPNET.Security;

------------------------------------------------------------------------------------------------------------------------------------------
--------------

56) Which of the following is a way to install/download a Nuget in your system?

a.In your browser go to nuget.org->click on Download

b.In visual studio,go to tools->Extension Manager->search Nuget->Install

c.All of the listed options----------------------------------------------------------------------------------Ans

d.In a visual studio,right click on references->Add LibraryPackageReferences->search Nuget->Install

------------------------------------------------------------------------------------------------------------------------------------------
--------------

57) public class DependencyResolver-is the syntax for Dependency resolver class.State True or False.

a.True---------------------------------------------------------------------Ans

b.False

------------------------------------------------------------------------------------------------------------------------------------------
--------------

58) Which of the following code snippets is correct for an entity Post having relationship with Blog?

a.modelBuilder.Entity<Post>().HasRequired(p=>p.Blog)------------------------Ans

b.modelBuilder.Entity<Post>().NeedRelationship(p=>p.Blog)
c.modelBuilder.Entity<Post>().Required(p=>p.Blog)

d.None of the listed options.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

59) Which of the following approach do we avoid working with the visual designer or entity framework?

a.Code First Approach.--------------------------------Ans

b.Model First Approach.

c.Database Approach.

d.None of the listed options.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

60) Which of the following statements are TRUE?

i.Client wins and store wins are actions which are used when concurrency happens.

ii.In Client wins the data from the server is loaded in to your entity objects.

iii.In Store wins data from the entity object is saved to the database.

a.i and ii

b.ii and iii

c.only i----------------------------------------------Ans

d.i,ii and iii

*************************************************************************************
************************************************

mohak

1.LINQ to Entities provides developers to write LINQ queries

Stata True or False.


Select one:

True-------------------------------------------------------ANS

False

------------------------------------------------------------------------------------------------------------------------------------------
--------------

2.DbContext does not support Complied Queries.

State True or False.

Select one:

True-------------------------------------------------------ANS

False

------------------------------------------------------------------------------------------------------------------------------------------
--------------

3.Linq 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.--------ans

b.Inline collections--------ans

c.Linq to objects

d.Anonymous types--------ans

e.All of the listed options.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

4.Localization is also known as____________.

Select one:
a.All the listed options

b.L10N-------------------------------------------------------ANS

c.LOC-zation

d.LCn

------------------------------------------------------------------------------------------------------------------------------------------
--------------

5.which of the following principals are included in the security context ?

Select one or more:

a. The login

b. The user--------------------------ANS

c. Authentication memberships--------ANS

d. Role memberships-----ans

e. Role aggregation

------------------------------------------------------------------------------------------------------------------------------------------
--------------

6.How are user defined functions different from User-defined Stored Procedures?

a.In user-defined function the default parameter is specified with a DEFAULT keyword.----ans

b.In User-defined function omitting the parameter also implies default value.

c.User-defined functions do not support output parameters.---------------------------------Ans

d.User-defined functions do support output parameters.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

7.Razor expression starts with____________.

a.@---------------------------------------------------ANS

b.%

c.#
d.$

------------------------------------------------------------------------------------------------------------------------------------------
--------------

8.john 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

a.$(function()($"#searchBox").autocomplete("/Product/SearchCandidates".{minChars:3}):})

b.$(function(){$("#searchBox").autocomplete("/Product/SearchCandidats",{minChars:3});});-----------------
--------------------------------------ANS

c.$(function(){$("#DivideBox")autocomplete("/Product/SearchCandidates",{minchars:3});});

d.$(function(){$("#searchBox")autocomplete("/Product/SearchCAndidates",{minchars:3})});

------------------------------------------------------------------------------------------------------------------------------------------
--------------

9.What is the significance of INSTEAD OF argument of the CREATE TRIGGER statement?

Select one or more:

a.Specifies that the DML trigger is excuted instead of the triggering SQl statement

b.It overrides the actions of the triggering statements-------------------------------------------------------------------


----------------ANS

c.It can be specified for DDl or logon triggers--------------------------------------------------------------------------------


-----------ANS

d.It cannot be specifoed for DDl or logon triggers.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

10.Which of the following provider is used to access data in conceptual model?


Select one:

a.EntityClient provider-------------------------------------------------------ANS

b.SqlClientProvider

c.EntityModelProvider

d.EntityContext

------------------------------------------------------------------------------------------------------------------------------------------
--------------

11.How are NON-clustered indexes different from Clustered indexes?

select one:

a.The data columns of the underlying table are not stored in order based on their nonclustered keys.

b.The data rows of the underlying table are sorted and stored in order based on their nonclustered keys.

c.The leaf layer of a nonclustetred index is made up of index pages instead of data pages.--------------------
-----------------------------------ANS

d.The leaf layer of a nonclustetred index is made up of data pages instead of index pages.

Link:-https://technet.microsoft.com/en-us/library/ms177484(v=sql.105).aspx

Nonclustered indexes have the same B-tree structure as clustered indexes, except for the following
significant differences:

1. The data rows of the underlying table are not sorted and stored in order based on their nonclustered
keys.

2. The leaf layer of a nonclustered index is made up of index pages instead of data pages.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

12.Which of the following statements are true about Clustered index?

Select one or more:

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.

c.A clustered index is implemented as a B-tree index strucuture-------------------------------------------------------


-------------------------ANS

d.A clustered index is implemented as aLinked-list structure.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

13.Which of the following object is used to query and modify data?

Select one:

a.OjectContext-------------------------------------------------------ANS

b.EntityOject

c.DataContext

d.None of the listed options.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

14. Your manager has given youa task to write a code to list recent 30 events and this should be
accessible to no one other than admins.

which of the following should you choose?

select one:

a.public class EventController:Controllers{public ActionResult Index(){AspNerDB db = new AspNerDB();


var f=db.WebEvents.OrderByDescending(e=>e.EventTime).take(30);return View(f);}}

b.[Authorize(Roles="Managers")]public class EventController:Controllers{public ActionResult


Index(){AspNerDB db = new AspNerDB(); var
f=db.WebEvents.OrderByDescending(e=>e.EventTime).take(30);return View(f);}}

c.[Authorize(Roles="Admin")]public class EventController:Controllers{public ActionResult


Index(){AspNerDB db = new AspNerDB(); var
f=db.WebEvents.OrderByDescending(e=>e.EventTime).take(30);return View(f);}}--------------------------------
-------------------------------------------ANS
d.public class EventController:Controllers{public ActionResult Index(){AspNerDB db = new AspNerDB();
var f=db.WebEvents.OrderByAscending(e=>e.EventTime).take(30);return View(f);}}

------------------------------------------------------------------------------------------------------------------------------------------
--------------

15.Which of the following are the data annotations attribute?

Select one or more

a.Compare

b.Range

c.Required-------------------------------------------------------ANS

d.StringLength-------------------------------------------------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

16.Which 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:

a.ConcurrencyCheck-------------------------------------------------------ANS

b.DatabaseCheck

c.EntityCheck

d.None of the listed options

------------------------------------------------------------------------------------------------------------------------------------------
--------------

17.analyse the link:- "http://localhost/music/". Choose the option which is correct for it

I. Not running under cassini

II. running under IIS


I only

II only

both I and II---------------ANS

none of the options

------------------------------------------------------------------------------------------------------------------------------------------
--------------

18.By default in Entity Framework Snapshot change tracking is enabled snapshot change tracking
mechanism.

State true or false

True-------------------------------------------------------ANS

False

------------------------------------------------------------------------------------------------------------------------------------------
--------------

19.what are the significance of recovery model setting??

Select one or more:

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

d) the default is partial which provides the greatest level of recovery

------------------------------------------------------------------------------------------------------------------------------------------
--------------

20.George wants to make the appearance of his site better.He wants to show an image when a
"divhello" result takes time to display.

Which of the following should he choose?


Select one:

a.[[email protected]("Hello","Hello",new AjaxOptions(){UpdateTargetID="div-
hello",HttpMethod="GET",LoadingElementId="divloadingimage"})....]

b.[[email protected]("Hello","Hello",new AjaxOptions(){UpdateTargetID="div-
hello",HttpMethod="GET",LoadingElementId="divloadingimage"})....]

c.[[email protected](AjaxOptions(){UpdateTargetID="divhello",HttpMethod="GET",LoadingElementId
="divloadingimage"})....]

d.[[email protected]("Hello","Hello",new
AjaxOptions(){UpdateTargetID="divhello",HttpMethod="GET",LoadingElementId="divloadingimage"})....
]------ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

21.which 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

22.Which of the following are used to locate the entities at the ends of an association in a conceptual
model?

Select one:

a.Navigation properties.------=---- Ans

b.Attributes

c.Index

d.Proxy

------------------------------------------------------------------------------------------------------------------------------------------
--------------

23.What is Dependency Injection?


Select one:

a.A technique for achieving tight coupling between objects and their collaborators.

b.A technique for achieving loose coupling between objects and their collaborators.----------------------------
---------------------------ANS

c.A technique for achieving tight coupling between Model and their views.

d.A technique for achieving tight coupling between Model and their respective server.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

24.Entities define the______________of an object but not the behavior of the object.

select one:

a.Object

b.schema-------------------------------------------------------ANS

c.Entity

d.None of the liosted options.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

25.A basic TDD cycle is______.

Select one:

a.Red-Green-Refactor-------------------------------------------------------ANS

b.Debud-Error-Resolve

c.Red-Green-Resolve

d.Fail-Pass-Repeat

------------------------------------------------------------------------------------------------------------------------------------------
--------------

26.We can pass information from a controller to a view using ViewBag.

State true or False:


Select one:

True-------------------------------------------------------ANS

False

------------------------------------------------------------------------------------------------------------------------------------------
--------------

27.Which of the following require type-casting in the view?

I.ViewData

II.TempData

Select one:

a.I only

b.II only

c.Both I and II-------------------------------------------------------ANS

d.None of the listed options

------------------------------------------------------------------------------------------------------------------------------------------
--------------

28.Which of the following keyword is used for lazy loading related data in entity framework?

Select one:

a.protected

b.virtual-------------------------------------------ANS

c.const

d.abstract

------------------------------------------------------------------------------------------------------------------------------------------
--------------

29.how can we disable proxy object creation in POCO?


A) CONTEXT.CONTEXTOPTIONS.ENABLED = FALSE;

B)CONTEXT.CONTEXTOPTIONS.PROXY=FALSE;

C) CONTEXT.CONTEXTOPTIONS.PROXYENABLED = FALSE;

D)CONTEXT.CONTEXTOPTIONS.PROXYCREATIONENABLED = FALSE;---------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

30.which of the package can be used to write an implementation for ASP.NET Identity that targets
different persistence stores such as Azure Table Storage, NoSQL databases etc..,?

Select one:

a.Microsoft.AspNet.Identity.OWIN

b.Microsoft.AspNet.Identity.Core...................ans

c.Microsoft.AspNet.Identity.Entityframework

d.Microsoft.ASPNET.Security

------------------------------------------------------------------------------------------------------------------------------------------
--------------

31. GlobalFilters.Filters.Add(new SampleFilter())- what will the above piece of code do ?

Select one:

a. It will move it sample filter to the global filter

b. None of the listed options

c. It will add custom filter "SampleFilter" to the GlobalFilters------------------------------------------------ANS

d. it is not possible to add new filter, so it will give an error

------------------------------------------------------------------------------------------------------------------------------------------
--------------

32. Which of the following statements are true about extended stored procedures?

Select one or more:


a. they are inherited from another user defined stored procedure

b. they are DLLs developed in a programming language like c that an instance of

Microsoft SQL server can dynamically load and run-------------------------------------------ANS

c. they run directly in the address space of an instance of SQL server-------------------------------------------ANS

d. they are programmed by using the SQL server extended stored procedure API--------------------------------
-----------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

33. ObjectContext mainly used for which of the following ?

i. Database connection

ii. Object set of every entity

iii. state of pending changes

Select one:

a. i and ii

b. i and iii

c. ii and iii

d. i, ii and iii-------------------------------------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

34. ModelBinder interface defines

select one:

a. the .dll files that are required for a model binder

b. the interface that are required for a model binder


c. the methods that are required for a model binder-------------------------------------------ANS

d. the assembly that are required for a model binder

------------------------------------------------------------------------------------------------------------------------------------------
--------------

35. which of the following is the correct option to get related subjects count without loading

it of the student name os "vijay" ?

select one:

a. var user = context.Users.where(b =>b.name == "vijay").FirstorDefault();var subjectCount =


user.Subjects.Count();

b. var user = context.Users.where(b =>b.name == "vijay").FirstorDefault();var subjectCount =


Content.Entry(user).Take(b =>b.Subjects).Query().Count();

c. var user = context.Users.where(b =>b.name == "vijay").FirstorDefault();var subjectCount =


Content.Entry(user).Include(b =>b.Subjects).Query().Count();

d. var user = context.Users.where(b =>b.name == "vijay").FirstorDefault();var subjectCount =


Content.Entry(user).Collection(b =>b.Subjects).Query().Count();------------------------------------------------------
--------------------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

36. Which statements are true about nonclustered indexes with respect to partitions?

select one or more:

a. nonclustered indexes have one row in sys.partitions with index_id >0 for each partition used by the
index-------------------------------------------ANS

b. nonclustered indexes have one column in sys.partitions with index_id >0 for each partition used by
the index

c. by default, a nonclustered index has a single partition-------------------------------------------ANS

d. by default, a nonclustered index has a multiple partition


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. public.ActionResult index(){var friends = db.Friends.Include(a => a.Contacts);return View(friends);}-----


--------------------------------------ANS

b. public.ActionResult index(){var friends = db.Friends;return View(friends);}

c. public.ActionResult index(){var friends = db.Friends.Insert(a => a.Contacts);return View(db.friends);}

d. public.ActionResult index(){var friends = db.Friends.add(a => a.Contacts);return View(friends);}

------------------------------------------------------------------------------------------------------------------------------------------
--------------

38. How does SQL Server execute a stored procedure or a trigger ?

select one or more:

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

engine detects the existing plan and reuse it------------------------------------------------------------------------------


--------------------ANS

e. if the execution plan has aged out of memory, a new plan is built-------------------------------------------------
----------------------------ANS
------------------------------------------------------------------------------------------------------------------------------------------
--------------

r39. Jason is trying to access Appsettings of "sampleserverA" & the accidently wrote this varserver =

ConfigurationManager.Appsettings["sampleserver"];- what result will he get ?

select one:

a. He will get an alert

b. He will get a nullvalue back

c. He will get a ArgumentException-----------------------------------------------------ANS

d. All the listed options

------------------------------------------------------------------------------------------------------------------------------------------
--------------

40. choose a code block which will show "Hello World" on the WEb page

select one:

a. public ActionResult Index()

View.Message = "Hello World";

return View();

b. public ActionResult Index()

View@Message = "Hello World";

return View();

}
c. None of the listed options

d.public ActionResult Index()

ViewBag.Message = "Hello World";-------------------------------------------ANS

return View();

------------------------------------------------------------------------------------------------------------------------------------------
--------------

41. "Type or Namespace name "SampleTest" could not be found" - you are getting the above error while
you

trying to build a test. what could be the reason ?

select one:

a. You didn't instantiate the object for the sampletest controller and view

b. you didn't have the class called "sample test"

c. the inline constructor is yet to get validated

d. you have not parsed the class assembly------------------------------------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

42. if we use database first generation a Dbcontext is generated by default

State true or false

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

d. all the listed options-------------------------------------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

44. which method in the DBcontext writes inserts, updates and deletes to the data source ?

select one:

a. save

b. saveChanges-------------------------------------------ANS

c. saveEntity

d. All of the listed options

------------------------------------------------------------------------------------------------------------------------------------------
--------------

45. Natasha is typing to access a page but she is not able to do it. on the other hand, when john logged
in

via his credentials he could. what may be the reason ?

select one:

a. web server credential overriding


b. role based access -------------------------------------------ANS

c. URL customization

d. Account rendering

------------------------------------------------------------------------------------------------------------------------------------------
--------------

46. Entity framework provides us with which of the following attribute to indicate multiple relationships

between two labels ?

select one:

a. [insertProperty]

b. [InverseProperty]------------------------------------------------------------ANS

c. [INProperty]

d. None of the listed options

------------------------------------------------------------------------------------------------------------------------------------------
--------------

47. how is the information returned from table-valued functions ?

select one or more:

a. information may be returned from table-valued functions using output paramaters-------------------------


------------------ANS

b. information may be returned from table-valued functions using return paramaters

c. you must specify the parameters by value

d. you must specify the parameters by reference--------------------------------------------------------------------------


----ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------
48. sam is developing ASP.NET MVC 3 web application. He is using SQL server as database. As it is in
staring stages,every time

the database changes, an error pops up in the application. which of the following method should sam
add to take care of this ?

select one:

a. DropCreateDatabaseselfModelChanges<>()-------------------------------------------ANS

b. RefreshDb<>()

c. DeleteUpdateDatabaseselfModelChanges<>()

d. none of the listed options

------------------------------------------------------------------------------------------------------------------------------------------
--------------

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

c. it can be used to store large blocks of text-----------------------------------------------------------------------ANS

d. it can be used to store large image types

------------------------------------------------------------------------------------------------------------------------------------------
--------------

50. By default value of "UnobstustiveJavaScriptEnabled" is

select one:

a.AUTO

b.None
c.False

d.True---------------------------------------------------------------------------------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

51.In which folder is the bundle.config file stored?

Select one :

a.App_Data

b.App_Start-------------------------------------------ANS

c.Content

d.Filter

------------------------------------------------------------------------------------------------------------------------------------------
--------------

52.Rafael is a new developer and the manager has told him to make the current code less complex.The
current code

has all the html and processing code in same file.

Which of the following should he choose?

Select one:

a.Advice him to use seperate models and controller for each logic and store it in new database

b.Advice 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

c.Advice him to create a new page for every logic.

d.None of the listed option

------------------------------------------------------------------------------------------------------------------------------------------
--------------

53.Which class is used for transactions in entity framework?


Select one:

a.System Transaction-------------------------------------------ANS

b.SqlTransaction

c.EntityTransaction

d.None of the listed options.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

54.Which of the following statements are true about varbinary data type?

Selct one or more:

a.varbinary can hold binary data.-------------------------------------------ANS

b.varbinary can hold character data.

c.can exceed 8000 characters -------------------------------------------ANS

d.the value is absed on regular expression logic

------------------------------------------------------------------------------------------------------------------------------------------
--------------

55.what are the steps for creating partition tables&indexes?

Select one or more:

a.Create partition function to specify how a table or index that uses the function can be partitioned-------
------------------------------------ANS

b.Create partition function to specify the placement of the partitions of a partition function on
filegroups

c.Create partition Schema to specify the placement of the partitions of a partition function on
filegroups------------------------------------------ANS

d.Create partition Schema to specify how a table or index that uses the function can be partitioned

e.Create a table or index using the partition Schema-------------------------------------------ANS


------------------------------------------------------------------------------------------------------------------------------------------
--------------

56.What are the restrictions related to the database file creation?

Selct one or more:

a. Database file name shouuld not be more than 8 characters

b.Database file name should be unique ----------------------------------------------------------------------------------


Ans

c.The file must reside on one of the following devices: the local server on which SQL Server is installed,a
Storage

Area Network[SAN],or an iSCSI-based network-----------------------------------------------------------------------------


----- Ans

d.The path specified must exist on the drive prior to creating the database--------------------------------------
Ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

57.find the correct code to execute sql raw query in the entity frameqwork from the following

select one:

a.using(var ctx = new schoolDBentities())

varstudentlist = ctx.students.sql("select*from student").tolist<student>();

b.none of these

c.using(var ctx = new schoolDBentities())

varstudentlist = ctx.students.execute("select*from student").tolist<student>();

d.using(var ctx = new schoolDBentities())

{
varstudentlist = ctx.students.sqlquery("select*from student").tolist<student>();-----------------------
--------------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

58.Show current date using javascript as Sat Jun 4 2016

select one:

a.-------------------------------------------ANS

<p id-"sample"></p>

<script>

var d= new Date();

document.getElementById("sample").innerHTML=d.toDateString();

</script>

b.

<p id-"sample"></p>

<script>

var d= new Date();

document.getElementById("sample").innerHTML=b.toDateString();

</script>

c.

<p id-"sample"></p>

<script>

var b= new Date();

document.getElementById("sample").innerHTML=d.toDateString();

</script>

d.

<p id-"sample"></p>

<script>
var d= new Date();

document.getElementById("sample").innerHTML=d.toDate();

</script>

------------------------------------------------------------------------------------------------------------------------------------------
--------------

59.Which of the following is issued to obtain a configuration object for a given property in Fluent API?

Select one:

a.ToTable()

b.HasKey()

c.HasDatabaseGeneratedOption()

d.Property()-------------------------------------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

60.Which of the following are database initialization strategies in EF code First?

Select one or more:

a.CreateDatabaseIfNotExists----------------------------------ANS

b.MigrateDatabaseToLatestVersion

c.CustomDBinitializer----------------------------------ANS

d.AlterDatabasewithchanges

*************************************************************************************
************************************************

arjun
Entity Framework supports three ways to load related data -

eager loading, lazy loading and explicit loading. The techniques

shown in this topic apply equally to models created with Code First and the EF Designer.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

60.which of the following loading is supported by Entity framework?

select one:

a.Eager Loading

b.Lazy Loading

c.Explictly Loading

d.All -----------------------------------------------------------------------------ANS

59.if stored procedure returns complex type that is only on conceptual model and not in databse table

ans:complex

------------------------------------------------------------------------------------------------------------------------------------------
--------------

58.George wants to make the appearence of his site better.He wants to show an image when a
"divhello" result takes time to display

which should be choosed?

select one

a.[[email protected](Ajax.Options())

UpdateTargetId="div-hello",Httpmethod="GET",LoadingElementId="divloadingimage"
} )...]

b.[[email protected]("Hello","Hello",new Ajax.Options())

UpdateTargetId="div-hello",Httpmethod="GET",LoadingElementId="divloadingimage"

} )...]

c.[[email protected]("Hello","Hello",new Ajax.Options())

UpdateTargetId="divhello",Httpmethod="GET",LoadingElementId="divloadingimage"

} )...]-------------------------------------------------------------------------------------------------------ANS

d.[[email protected](Ajax.Options())

UpdateTargetId="divhello",Httpmethod="GET",LoadingElementId="divloadingimage"

} )...]

------------------------------------------------------------------------------------------------------------------------------------------
--------------

57.dependency resolver() is destructor

a.true

b.false...............ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

56.where can CLR functions be used?


select one or more:

a.CLR functions can be used to access external files-----------------------------------------------------------------------


------ANS

b.CLR functions can be used to access network resources---------------------------------------------------------------


--------------ANS

c.CLR functions can be used to configure the instance of SQL server--------------------------------------------------


---------------------------ANS

d.CLR functions can be used to access WEb services----------------------------------------------------------------------


-------ANS

e.CLR functions can be used to connect to other databases ------------------------------------------------------------


-----------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

55.The syntax of GetService Method is?

Select one

a.object.GetService(

Type serviceType

b.object GetService(

Type serviceType

)-----------------------------------------------------------------------------ANS

c.object GetService(

object.serviceType

)
d.object GetService(

Type.serviceType

------------------------------------------------------------------------------------------------------------------------------------------
--------------

54.output cache is used to cache output of a controller

ans:true

It enables us to cache the content returned by any controller method

so that the same content does not need to be generated each time the same controller method is
invoked

------------------------------------------------------------------------------------------------------------------------------------------
--------------

53.entity sql is a storage independent query language

ans:true

------------------------------------------------------------------------------------------------------------------------------------------
--------------

52.which of the following method is used to get correct type for the specified target role in a
relationship in the class relationshipmanager?

select one:

a.GetRelated End---------------------------------------------------ANS

b.getRelatedCollection

c.GetObjectstateEntries

d.None

------------------------------------------------------------------------------------------------------------------------------------------
--------------
51.Which of the following is the full form of CSDL ?

a.Conceptual SelectData Definition Language

b.Conceptual Select Definition Language

c.Conceptual Set Definition Language

d.Conceptual Schema Definition Language-------------------------------------------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

50.How can we get the single employee name when there are many employees whose name is "John" in
the database?

Select one:

a.var employee=(from emp in contextobject.Employee where emp.EmployeeName="John"select


emp).FirstOrDefault<Employee>()

b.var employee=(from emp in contextobject.Employee where emp.EmployeeName=="John"select


emp).FirstOrDefault<Employee>()-----------------------------------ANS

c.var employee=(from emp in contextobject.Employee where emp.EmployeeName=="test" select emp);

d.None of the listed options

------------------------------------------------------------------------------------------------------------------------------------------
--------------

49.Which of the following does the input to QueryOptimizer consist?

Select one or more:

a.The query-------------------------------------------------ans

b.The database schema-------------------------------------------------ans

c.The database statistics-------------------------------------------------ANS

d.the selected rows.


Note:The input to the optimizer consists of the query, the database schema (table and index
definitions), and the database statistics.

(https://technet.microsoft.com/en-us/library/ms190623(v=sql.105).aspx)

------------------------------------------------------------------------------------------------------------------------------------------
--------------

48.Which are the following are the type of entity?

Select one or more:

a.POCO entity------------------------------------------------------------ANS

b.Dynamic proxy entity------------------------------------------------------------ANS

c.DbContext

d.ObjectContext

------------------------------------------------------------------------------------------------------------------------------------------
--------------

47.Which statements are true about RANK function?

Select one or more:

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 come before the row in question.

c.The rank of a row is one plus the number of ranks that come before the row in question--------------------
-----ANS

d.the RANK function returns consecutive integers.

e.The Rank function does not always return consecutive integers. ---------------------------------------------------
----------------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------
46.LINQ to XML is based on in-memory XML programming interface.

State True or False

Select one:

True----------------------------------------------------ANS

False

------------------------------------------------------------------------------------------------------------------------------------------
--------------

45.What are the conditions for assemblies created by using EXTERNAL ACCESS permission sets?

Select one or more:

a.The assesmbly code should be type-safe--------------------------------ANS

b.the assesmbly should contain only static data members in its classes unless they are marked as read-
only

c.the classes in the assesmbly must contain finalizer methods

d.the classes or methods of the assesmbly should be annotated only with allowed

codes attributes------------------ANS

(https://msdn.microsoft.com/en-us/library/ms189524.aspx)

------------------------------------------------------------------------------------------------------------------------------------------
--------------

44.Which one in the following is not included in the configuration hierarchy?

Select one:

a.Root web

b.IIS

c.ASP.NET Application sub directory

d.ASP.NET Client Server sub directory------------------------------------------------------------ANS

e.ASP.NET root directory.


------------------------------------------------------------------------------------------------------------------------------------------
--------------

43.What is meant by Materialization in entity framework? REPEATED QUESTION

Select one:

a.Materialization is the process of returning query results back to the client as entity types.

b.Materialization is the process of returning query results back to the client as CLR types.---------------------
----------ANS

c.Materialization is the process of returning queries back to the client as CLR types.

d.None of the listed options.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

42.Which command will remove the package?

Select one:

a.Remove packageName

b.Delete package

c.Uninstall-package PackageName ----------------------------------ANS

d.None of the listed options.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

41.You need to write a view to show Hi!"username" If user is authenticated display signoff link & sign in
link for anonymous user.

Which of the following should you choose?

Select one:
a.<%if(Request.IsAuthenticated){Hi!<%=Html.Encode(page.User.Identity.Uname)%>[<%=Html.ActionLin
k("SignOff","SignOff","Account")%>]<%}else{%>[<%=Html.ActionLink("Sign In","Sign
In","Account")%>]<%}%>-------------------------------------------------------------------------------------------ANS

b.<%{Hi!<%=Html.Encode(page.User.Identity.UName)%>[<%=Html.ActionLink("Sign Off","Sign
Off","Account")%>]<%}else{%>[<%=Html.Action.Link("Sign in","Sign in","Account")%>]<%}%>

c.<%(user=Authorize){Hi!<%=Html.Encode(page.User.Identity.UName)%>[<%=Html.ActionLink("Sign
Off","Sign Off","Account")%>]<%}else{%>[<%=Html.ActionLink("Sign in","Sign in","Account")%>]<%}%>

d.All of the listed options.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

40) Which of the following is Lambda operator?

a) "a"

b) "=>"-----------Ans

c) " "

d) "@"

------------------------------------------------------------------------------------------------------------------------------------------
--------------

39.Detatch state is the default state of newly created entity.?

ans:true

Note:Detached is the default state of a newly created entity because the context can’t track the creation
of any object in your code.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

38) Which statements are true about DENSE_RANK function?

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
37.You are given a task by your manager that include assembly binding??

ans:Machine.Confing

Note: Machine.config contains configuration settings for machine-wide assembly binding, built-in
remoting channels, and ASP.NET.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

36) What does the update command do?

a) Updates a package----------Ans

b) Updates the project

c) Updates the Visual studio

d) Updates the solution

------------------------------------------------------------------------------------------------------------------------------------------
--------------

35) On what conditions can you perform concurrent online index operations on the same table?

a) Creating multiple clustered indexes

b) Creating multiple nonclustered indexes------------------------------ans

c) Reorganizing different indexes on the same table------------------------ans

d) Reorganizing unique indexes on multiple tables

e) Reorganizing different indexes while rebuilding nonoverlapping indexes on the same table---------------
-ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

34) How can we disable proxy object creation in POCO?

a) context.ContextOptions.Enabled=false

b) context.ContextOptions.Proxy=false

c) context.ContextOptions.ProxyEnabled=false

d) context.ContextOptions.ProxyCreationEnabled=false----------Ans
------------------------------------------------------------------------------------------------------------------------------------------
--------------

33) What is Remote Validation?

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

b) A mechanism to validate a client machine through remote call

c) A mechanism to validate form field using remote conditions

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?

a) Generate a Database from a Model------------Ans

b) Generate a Model from the Class

c) Generate a Model from the Database

d) Generate a Object from the Model

------------------------------------------------------------------------------------------------------------------------------------------
--------------

31) Which of the following are the properties of the HTTPConfiguration class?

Select one or more:

a) Message Handlers----------Ans

b) Comparer

c) Stack Tree

d) Dependency Resolver--------Ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

30.In Model We can keep Which of the following:


select one or more

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).

------------------------------------------------------------------------------------------------------------------------------------------
--------------

29)what is the purpose of NotMapped annotation in entity framework

a)not to create a property for an entity

b)to remove mapping a property to the data base for an entity..........ans

c)to add property for a data base entity

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.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

28.Which of the following arguments of the CREATE TRIGGER statements specifies

the security context under which the trigger is executed.

a)all server

b)with encryption

c)execute as--------------ans

d)instead of

------------------------------------------------------------------------------------------------------------------------------------------
--------------

27.By default, LINQ supports which of the following


i.Lazy Loading--------------ans

ii.Eager Loading

iii.Deferred Loading

Note:By default LINQ supports lazy


loading.(http://www.dotnettricks.com/learn/entityframework/difference-between-lazy-loading-and-
eager-loading)

------------------------------------------------------------------------------------------------------------------------------------------
--------------

26.Which of the following statements are true about trigger creation?(multiple)

a.CREATE TRIGGER must be the first statements in the batch-----------------------ans

b.CREATE TRIGGER must be the last statements in the batch

c.CREATE TRIGGER can apply to only one table----------------------------------------------------ans

d.CREATE TRIGGER can apply to multiple tables

e.A trigger is created only in the current database;however a trigger

can references objects outside the current database-----------------------ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

25.Which of the following two are name types of SQL Server Files? (//hold)

select one or more:

a: Physical_File_name

b: Logical_file_name ......................ans

c: Primary_File_Name

d: Os_File_Name ...........................ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

23)which of the following options are true about temp. stored procedures
with respect to performance?

b:Heavy use of temporary stored procedures can create contention on the system tables in tempdb
and adversely affect performance........ans

c:It is recommended that sp_executesql be used instead....................ans

e:sp_executesql discard data in the system tables and therefore avoids the problem............ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

22.In entity framework ,Data is retrieved as objects.

true..................ans

false

------------------------------------------------------------------------------------------------------------------------------------------
--------------

21.What are Entity state members?

select one

a:Added

b:Deleted

c:Modified

d:All of the listed options..................ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

20. What is entity key?

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
d. All of the listed options

------------------------------------------------------------------------------------------------------------------------------------------
--------------

19.Read 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

------------------------------------------------------------------------------------------------------------------------------------------
--------------

18.You 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

------------------------------------------------------------------------------------------------------------------------------------------
--------------

17.What are the features supported by SQLXML in SQL Server?

select one or more

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

c. ability to access SQL server using HTTP-------------------------------------------------------------ANS

d. ability to access SQL server using TCP/IP

e. ability to expose functionality offered by stored procedures, user-defined functions, and template
queries as SOAP-based web services-------------------------------------------------------------ANS
------------------------------------------------------------------------------------------------------------------------------------------
--------------

16. What will be the output of the following code

Public ActionResult Search (string idea="A"){

return View();

I. It will set the default value of String idea to "A"

II. It will set the default pointer of idea to "A"

Select one:

a. Both I and II

b. II only

c. None of the listed

d. I only-------------------------------------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

15.In which of the following conditions one should go for partitioning table

select one or more:

a.table contain large amounts of data that are used in different ways.-----------------------------------ans

b.database contain large amount of table

c.Queries or updates against the table are not performing as intended, or maintenance costs exceed
predefined maintenance periods.....ans

d.If tables has many columns.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

14.which of the statement are true about DATABASE argument of the create trigger statement

select one or more:


a.applies scope of DDL to current database.----------------------ans

b.The trigger fires whenever event_type or event_group occours.-------------------------ans

c.The trigger fires whenever new record is inserted in table in current database

d.The trigger fires whenever record is deleted from table in current database.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

13.which of the following method is used to change relationship state of two entity object

a.ChangeRelationship

b.ChangeRelationshipState--------------------------ANS

c.ChangeRelation

d.None of the above

------------------------------------------------------------------------------------------------------------------------------------------
--------------

12.Which file will conatin the application level configurations?

select one:

a.Config.config

b.Global.aspx

c.Web.config..................ans

d.Packages.Config

Note:ASP.NET configuration data is stored in XML text files that are each named Web.config.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

11.What does LINQ to SQL do:

I.It enables you to query data using Datacontext

II.It provides tightly coupled approach

Select one:
a.onlt I

b.only II

c.both I and II-------------------------------ANS

d.neither I or II

------------------------------------------------------------------------------------------------------------------------------------------
--------------

10.Entity Framework____________________ all data before storing it to the database by default ,using
valiadtion method.

b.Validates ..........ans

9.Datepicker lets yu pic date from calendar instead of writing it?true----ans

8.Show alert on the page:

a. alert("you have generated an alert box");..........ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

7.Whhich of the following method in Entity type configuration is used to configure an optional
relationship?

a.HasOptional..........ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

6.what are the different classes into which sql server divides principals?

ans:a,c,d

5 store schema definition language (SSDL)

------------------------------------------------------------------------------------------------------------------------------------------
--------------
4.___________ allows you to store and retrieve values using object-property syntax rather than key-
value syntax used by dictionary object.

a.ViewBag.................ans

b.Tempdata

c.viewindex

d.ViewData

------------------------------------------------------------------------------------------------------------------------------------------
--------------

2.Which of the following is used to configure a Code First Model?

select one

a.Fluent API....................ans

b.EntityModel

c.Web.Config

d.None of the listed options

------------------------------------------------------------------------------------------------------------------------------------------
--------------

1.What provides the ability to asynchronously exchange data between a web browser and a web server?

select one

a.XMLHttpRequest.................ans

b.XSLHttpRequest

c.CSSHtmlRequest

d.XMLHtmlRequest

*************************************************************************************
********************************************************************************
gokul-1st attempt

(Gokul)

1.You are given a task to make the current from secure such that it can be prevented cstf.Which of the
following will be helpful?

Select one:

a.<% using(Html.BeginForm()){%> <% = Html.AntiLibrary()%>

b.<% using(Html.BeginForm()){%> <% = Html.AntiForgeryToken()%>-------------------------------------------------


-ANS

c.<% using(Html.BeginForm()){%> <% = Html.AntiCSRFToken()%>

d.<% using(Html.BeginForm()){%> <% = Html.AntiCSRFLibrary()%>

------------------------------------------------------------------------------------------------------------------------------------------
--------------

2. Which of the follwing statements are true about AFTER trigger?

Select one or more:

a.AFTER trigger executes after the statement that triggeres it completes..................................ans

b.AFTER trigger executes after the last trigger in the queue.

c.If the statemnt falls with an error the trigger is not executed...............................ans

d.AFTER triggers cannot be specified for tables,they can only be specified foe views

e.AFTER triggers cannot be specified for views,they can only be specified foe tables...................ans

ANS:a,c,e

3. The ObjectContext class is not thread-safe

State True or False

Select one:
True--------------------------------------------------------------------------------------------ANS

false

------------------------------------------------------------------------------------------------------------------------------------------
--------------

4.How can the execution plans of queries on partitioned tables and indexes be examined?

Select one or more:

a.By using the transact-SQL SET SHOWPLAN_XML

b.By using the transact-SQL SET STATISTICS_XML--------------------------------------------------------------------------


------------------ANS

c.By using the transact-SQL SET PARTITION_XML

d.By using the transact-SQL SET INDEX_XML

------------------------------------------------------------------------------------------------------------------------------------------
--------------

5.Analyse the link:-"Http"//localhost/music/".Choose the option which is correct for it.

I.Not running under cassini.

II.Running under IIS.

Select one:

a.I only

b.II only

c.Both I and II --------------------------------------------------------------------------------------------ANS

d.None of the listed options.

------------------------------------------------------------------------------------------------------------------------------------------
--------------
6.public void TestDate()

Distance z= new Distance();

var message = new Sample(z);

AssertAreEqual(distance,message.z);

}-Analyse the code and identify why it will not work.

Select one:

a.[Status=TestMethod]is not written

b.[TestMethod]is not written

c.proper refference is not invoked at the start of the test. --------------------------------------------------------------


--------------------ANS

d.None of the above

------------------------------------------------------------------------------------------------------------------------------------------
--------------

7. What are the benefits of using a Unique index?

Select one or more:

a.It is less error prone

b.Data integrity of the defined columns is ensured..................ans

c.Additional information helpful to the query optimizer is provided..................ans

d.The performance is not degraded...................................ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

8.Which of the following is a way to install/download a Nuget in your system?


Select one:

a.All the listed options-------------------------------------------------------------------------------------ANS

b.In visual studio, go to tools->Extension Manager->search Nuget->install

c.In your browser go to nuget.org->click on Download

d.In a visual studio,right click on References->Add LibraryPackagesReferences->search Nuget->Install

------------------------------------------------------------------------------------------------------------------------------------------
--------------

9.public class DependencyResolver

- is the syntax for Dependency Resolver class

State True or False

Select one;

True--------------------------------------------------------------------------------------------ANS

False

------------------------------------------------------------------------------------------------------------------------------------------
--------------

10.How can we create basic Entity Mapping?

Select one:

a.modelBuilder.Entity<Blog>().MapStoredProcedures();

b.modelBuilder.Entity<Blog>().MapToStoredProcedures();--------------------------------------------------------------
--------------------ANS

c.modelBuilder.Entity<Blog>().ToStoredProcedures();

d.modelBuilder.Entity<Blog>().StoredProcedures();

------------------------------------------------------------------------------------------------------------------------------------------
--------------
11) Which of the following is true for DB initialization in config file

ANS

<?xml version="1.0" encoding="utf-8"?><configuration><appSettings>

<add key="DatabaseInitializerForTypeBlogdataLayer.BlogDBContext, BlogDataLayer"

value="System.Data.Entity.DropcreateDatabasealways'1[[BlogdataLayer.BlogDBContext,BlogdataLayer]]
,EntityFramework"/>

</appSettings></configuration>

12) LINQ stands for-----

Line integrated new query

Language integrated new query

Language integrated Query---------ANS

Line Integrated Query

------------------------------------------------------------------------------------------------------------------------------------------
--------------

13) Which of the following option is correct about navigation property

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

All of the options----------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

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

------------------------------------------------------------------------------------------------------------------------------------------
--------------

16) Which are the different types of filegroups?

Secondary

Primary------------------ANS

User-defined-------------ANS

Hidden

------------------------------------------------------------------------------------------------------------------------------------------
--------------

17) Which statements are true about CLR stored procedures?

It is a reference to a microsoft .net framework common language runtime(CLR) method------------


--------ANS

the method can only take and return user-supplied parameters.------------------------------------------


ANS

the method can only take input parameters.

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?

DbSet.Find

DbSet.remove

DbSet.Attatch

All of the options------------------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

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

None of the listed options------------- ANS (doubt) may be ans is


dbupdateconcurrencyexception...........right

------------------------------------------------------------------------------------------------------------------------------------------

21) By default value of "UnobstrusiveJavaScriptenabled" is

FALSE
TRUE----------ANS

NONE

AUTO

------------------------------------------------------------------------------------------------------------------------------------------
--------------

22) Which of the following will render carinfo object stored in viewbag to a view

<p>---------------------------------------------- ANS

car information: @ViewBag.carinfo

</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

editing the url.

as a friend suggest him to use "ChildAction" through "@Html.Action".which of the following


would he chose??

peter should use "@html.goThrough" inplace of "@Html.Action"

peter should use "ChildActionOnly" inplace of "ChildAction"---------------------------------------Ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

24) Which method converts string to HTML Encoded string

HtmlUtility.Httpcode

HttpUtility.HtmlEncode---------------------------ANS
HttpUtility.Htmlcode

HtmlUtility.XmlEncode

------------------------------------------------------------------------------------------------------------------------------------------
--------------

25) ModelBinder interface defines---------

the methods that are required for a model binder---------------ANS

the .dll filesthat are required for a model binder

the interface that are required for a model binder

the assembly that are required for a model binder

------------------------------------------------------------------------------------------------------------------------------------------
--------------

41. You are given a task by your manager that includes assembly binding.Which file would you
configure?

select one:

a.System.config

b.web.config

c.Machine.config-----------------------------------ANS

d.Config.config

------------------------------------------------------------------------------------------------------------------------------------------
--------------

42.

Unchanged state is the default state for an entity while the entity is retrived from the database

a.True-----------------------------------------------ANS

b.False

------------------------------------------------------------------------------------------------------------------------------------------
--------------

43.Which of the statement is true about VARCHAR datatype?

select one or more:


a.varchar can hold alphanumeric data----------------------------------------ANS

b.The storage size of varchar data type is fixed

c.Each row can hold different no of characters up to the maxlength defined.---------------------------------ANS

d.Each row can hold fixed number of characters as defined by max length.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

44.Which 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:

a.HttpStatusCodeResult

b.HttpRedirectResult

c.HttpNotFoundResult

d.RedirectResult------------------------------------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

45.Machine.config contain setting that apply to entire network.

a.true

b.False----------------------------------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

46.______________is an XML -based language which describes the entities ,functions and relationships
which create a conceptual model of a application.

select one:

a.conceptual schema definition language(CSDL)-----------------------------------ANS

b.Conceptual set definition language(CSDL)

c.conceptual select definition language(CSDL)

d.None of above
------------------------------------------------------------------------------------------------------------------------------------------
--------------

47. Which statements are true about the max constant in a varchar type?

a.It can be used when the data can exceed more than 8000 charactes.---------------------ans

b.it can be used to fix the max length of charactes for the entire column---------------------ANS

c.It can be used to store large blocks of text.---------------------------------------------ANS

d.It can be used to store large image types.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

48.EDMX is an XML file

a.true---------------------------------------ANS

b.False

------------------------------------------------------------------------------------------------------------------------------------------
--------------

49.Which of the package can be used to write an implementation for ASP.NET identify that targets
different persistence store such as Azure Table Storage,NoSql database etc.

a.Microsoft.AspNet.Identity.Core---------------------------------------------------ANS

b.Microsoft.AspNet.Identity.EntityFramework

c.Microsoft.AspNet.Identity.OWN

d. Microsoft.AspNet.Identity.Security

------------------------------------------------------------------------------------------------------------------------------------------
--------------

50.How can we stop autodetection change in entity framework?

select one:

a.Context.Configuration.AutoDetectChangesEnabled=false;------------------------------------ANS

b.Context.Configuration.AutoDetectChangesdisabled=false;
c.Context.Configuration.AutoDetectChangesEnabled=true;

d.Context.Configuration.AutoDetectChangesdisabled=True;

------------------------------------------------------------------------------------------------------------------------------------------
--------------

51)Which of the following statements are TRUE?

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 supply parameters of primitive type but you cannot replace parts
of the query that would change the generated SQL

a.i and ii

b.ii and iii

c.i and iii----------------------------Ans

d.i,ii and iii

------------------------------------------------------------------------------------------------------------------------------------------
--------------

52)Which of the following require type-casting in the View?

i.ViewData

ii.TempData

a.i only

b.ii only

c.Both i and ii--------------------------Ans

d.None of the listed options

53)Which of the following snippet creates database in local sql express by default?

i.public class Context:DbContext

public Context():base()

{
}

ii.public class Context:DbContext

public Context():base("DB Name")

iii.public class Context:DbContext

public SchoolDBContext():base("name=EduDB")

a.i and ii

b.i and iii

c.ii and iii--------------------ans

d.i,ii and iii

------------------------------------------------------------------------------------------------------------------------------------------
--------------

54)Which of the following code snippets is correct for an entity Post having relationship with Blog?

a.modelBuilder.Entity<Post>().HasRequired(p=>p.Blog)------------------------Ans

b.modelBuilder.Entity<Post>().NeedRelationship(p=>p.Blog)
c.modelBuilder.Entity<Post>().Required(p=>p.Blog)

d.None of the listed options.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

55)IObjectContextAdapter Interface is used to:

a.get the reference of ObjectContext from object

b.get the reference of ObjectContext from Entity

c.get the reference of ObjectContext from DBModel

d.get the reference of ObjectContext from DBContext------------------Ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

56)Which of the following are database initializers used in Entity Framework?

a.CreateDatabaseIfNotExists--------------------------Ans

b.DropCreateDatabaseIfModelChanges-------------------Ans

c.DropDatabaseAlways

d.DropCreateDatabaseAlways---------------------------Ans

e.CreateDatabaseAlways

------------------------------------------------------------------------------------------------------------------------------------------
--------------

57)What are the different classes into which the SQL Server divides principals?

a.Windows-level principal-----------------------------Ans

b.Field-level principal

c.Database-level principal-----------------------------Ans

d.SQL Server-level principal---------------------------Ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

58)What is entity key?


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 identify relationship
among the entities

d.All of the listed options

------------------------------------------------------------------------------------------------------------------------------------------
--------------

59)In remote validation HttpPost is used by default.State True or False.

a.True---------------ans

b.False

------------------------------------------------------------------------------------------------------------------------------------------
--------------

60)Which of the following are different Securable scopes?

a.Server-------------------Ans

b.Client

c.Database------------------Ans

d.Schema---------------------Ans

*************************************************************************************
*************************************************************************************
*************************************************************

HEMANT

2.How does the ROWCOUNT_BIG function work?

select one or more

a.Returns the total number of rows in a table


b.Returns the number of rows affected by the last staetement executed--------------ans

c.The return type of ROWCOUNT_BIG is bigint--------------------ans

d.The return type of ROWCOUNT_BIG is int

------------------------------------------------------------------------------------------------------------------------------------------
--------------

3.For which attributes of columns,clustered indexes are not advisable?

select one or more

a.Columns are unique or contain distinct values

b.Columns change frequently------ans

c.Columns are accessed sequently

d.when there are wide keys.-----ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

4.which of the following will render carinfo object stored in VIewBAg to a view?

select one

a.<p>

car information: @ViewBag{carinfo}

</p>
b.<p>

car information: @View.carinfo

</p>

c.<p>

car information: @ViewBag.carinfo

</p>---------------------------------ans

d.<p>

car information: @ViewBag.display(carinfo)

</p>

5.As good practice what should you follow to prevent XSS attacks?

select one or more

a.Santize HTML markup-----------------ans

b.Donot put untrusted data---------ans

c.Do not use javascript

d.Do allow cross scripts---------------ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

6.What do you understand by state management?

select one:
a.It is a process by which you override the state and client information over multiple requests for the
same pages.

b.It is a process which you override the state and page information over single functional calls for the
same controller

c.It is a process by which you maiintain the client and server information over multiple requests for the
same or different pages

d.It is a process by which by whoch you maintain the state and page information over multiple requests
for the same or different pages------ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

7.What do you mean by eager loading in MVC?

I.Related objects(child objects)are loaded automatilly with its parent object.

II.Related objects(child objects)are not loadede automatically with its parent object until they are
requested.

Select one:

a.I only-----------------ans

b.None

c.Both I and II

d.II only

------------------------------------------------------------------------------------------------------------------------------------------
--------------

12.How are user-defined functions different from User-defined stored procedures?


sselect one or more

a.In user-defined function the default parameter is specified with a DEFAULT keyword---------------ans

b.In user-defined function omitting the parameter also implies default value

c.User-defined functions do not support output parameters-----------------ans

d.User defined functions do support output parameters

------------------------------------------------------------------------------------------------------------------------------------------
--------------

16.As a good practice we should put HTML in which of the following?

I.View

II.Partial View

III.Semi-Partial View

select one:

a.I and II------------------------ans

b.II and III

c.I and III

d.I,II,III
------------------------------------------------------------------------------------------------------------------------------------------
--------------

18.What is the difference deterministic & non-determinstic scalar-valued function?

select one or more

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

------------------------------------------------------------------------------------------------------------------------------------------
--------------

19.Which of the following option is Correct to turn off lazy loading for all the entities for BLogging
Context?

select one:

a.public class BloggingContext :DbContext{public BloggingCOntext()


{this.Configuration.LazyLoadingEnabled =false;}}-----------ans
b.public class BloggingContext :DbContext{public BloggingCOntext()
{this.Configuration.LazyLoadingEnabled =true;}}

c.public class BLoggingContext :DbContext{public BloggingCOntext()


{this.Configuration.LazyLoadingDisabled =true;}}

d.None

------------------------------------------------------------------------------------------------------------------------------------------
--------------

20.Which method in MOdelBuilder make sure that entity should have relationship with other entity?

select one:

a.Required

b.NeedRelationship

c.HasRequired---------------ans

d.None

------------------------------------------------------------------------------------------------------------------------------------------
--------------

22.Which of the following are the attributes of System.ComponentModel.DataAnnotations.Schema


class?

a. Timestamp-------------------ans
b. Model

c. ConcurrencyCheck------------------ans

d. Entity

------------------------------------------------------------------------------------------------------------------------------------------
--------------

24.Which of the following statement is used to fetch an entity using composite key ?

select one:

a.Context.MYDbSetTableEntity.Find(key1,key2)-----------------------ans

b.Context.MYDbSetTableEntity.Take(key1,Key2)

c.context.MyDbSetTableEntity.Include(key1,key2)

d.context.MyDbSetTableEntity.GetEntity(obj)

------------------------------------------------------------------------------------------------------------------------------------------
--------------

26.Which of the following are the properties of the HTTPConfiguration Class?

select one or more:

a.Stack Tree

b.Dependency Resolver---------ans

c.Message Handlers----------ans
d.Comparer

------------------------------------------------------------------------------------------------------------------------------------------
--------------

27.Choose the code to show alert on page.

select one:

a.alert("you have generated an alert box")

b.alert("you have generated an alert box");----------ans

c.None

d.alert(you have generated an alert box);

------------------------------------------------------------------------------------------------------------------------------------------
--------------

28.ObjectContext is a class.

state true or False

true----------ans

false

------------------------------------------------------------------------------------------------------------------------------------------
--------------

29.Using 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

------------------------------------------------------------------------------------------------------------------------------------------
--------------

30.Entity Framework can track changes to the model's objects.

True------------ans

FAlse

------------------------------------------------------------------------------------------------------------------------------------------
--------------

31.What 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:

a.BAsic Authentication

b.Digest Authentication-------------------ans

c.Forms Authentication
d.Windows Authentication

d.All

------------------------------------------------------------------------------------------------------------------------------------------
--------------

32.which of the following class provides you important methods to configure entities and its properites
to override various code-first conventions?

select one

a.EntityCOntext

b.EntityTypeCOnfiguration---------------ans

c.DBCOntext

d.ObjectContext

------------------------------------------------------------------------------------------------------------------------------------------
--------------

34.ObjectCOntext EF v4.0 and DbCOntext EF V4.1

True ----------------------------------ANS

FAlse

------------------------------------------------------------------------------------------------------------------------------------------
--------------

35.There can be one PreApplicationStartMethod per assembly.


True-------ans

False

------------------------------------------------------------------------------------------------------------------------------------------
--------------

36.In COnceptual model,which of the following defines relationship between two entity types?

select one:

a.Entity

b.Association----------------ans

c.Object

d.None

------------------------------------------------------------------------------------------------------------------------------------------
--------------

37.Which of the following annontation is to EF that a particular property is required ?

select one:

a.Needed

b.required------------------ans

c.Unique
d.Key

39.which of the following loads the related data inscalaar and navigation properties along with query
result at first shot ?

select one :

a.LAzy Loading

b.Eager Loading------------------ans

c.Explicitly Loading

d.Dynamic Loading

------------------------------------------------------------------------------------------------------------------------------------------
--------------

42.which class is used to execute an Entity SQL COmmand against an entity mode ?

select one

a.EntityCommand-------------ans

b.EntityCOnnection

c.SqlCOmmand

d.None

------------------------------------------------------------------------------------------------------------------------------------------
--------------
43.which statement are true about an inline scalar function?

selct one or more

a.There is no functiion body --------------ans

b.The function body defined in BEGIN ...END block contains a series of T-SQL statements

c.The scalar value is a result of a single statement --------------ans

d.The scalar value is a result of all statements in the BEGIN...END block

------------------------------------------------------------------------------------------------------------------------------------------
--------------

45.To enable globalization ,whcih of the following parameters are set in auto mode?

select one or more

a.Languge

b.Culture------------ans

c.Localization

d.Uiculture-----------ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------
46.which of the following advantage does a strongly typed view have ?

select one:

a.Run time

b.Intellisense---------ans

c.faster buffering

d.loading

------------------------------------------------------------------------------------------------------------------------------------------
------------

48.The controller class is responsible for the following processing stages:

selct one:

a.Locating the appropriate action method to call and validating that it can be called

b.Getting the values to use as the action method's arguments.

c.Handling all errors that might occur during the execution of the action method

d.All------------ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

51.Choose 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;

Disatnce d1=new Distance("A1",total_distance)

d1.covered(distance_covered);

int left=d1.remaining;

Assert.AreEqual(distance_left,left); -----------------ans

b.

[TestMethod]

int total_distance=2;

int distance_covered=10;

int distance_left=10;

Disatnce d1=new Distance("A1",total_distance)

d1.covered(distance_covered);

int Left1=d1.remaining;

Assert.AreEqual(distance_left.left);

c.
[TestMethod]

int total_distance=2;

int distance_covered=10;

int distance_left=10;

Disatnce d1=new Distance("A1",total_distance)

d1.covered(distance_covered);

int Left1=d1@remaining;

Assert.AreEqual(distance_left.left);

d.All the listed options

------------------------------------------------------------------------------------------------------------------------------------------
--------------

53.What does the following code denote?(not sure )

DECLARE @odetails orderdetails;

SELECT @odetails =orderdetais::GetFirstItem();

PRINT @odetails.ToString();

Select one or more:

a.It denotes usage of Scope Resolution operator-----ans

b.It denotes usage of Compound operator

c.The operator is denoted by a::symbol-----ans

d.The operator provides access to public non-static memebers of acompind data type

e.The operator provides access to static memebers of a compund data type.-----ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------
56.Which of the following model is the design model to include tables,stored procedures,views,keys and
relatonship?

Select one:

a.Mapping

b.Conceptual----------------------ans

c.Storage

d.None of the listed options.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

57.Views are used to control placement of_______.

Select one:

a.Object -------------ans

b.Property

c.data

d.File

------------------------------------------------------------------------------------------------------------------------------------------
--------------

58.Which of the following method of the ObjectStateManager is used to get Object State entry?

Select one:

a.TryGetObectStateEntry-------------ans

b.ChangeObjectState

c.GetRelationshipManager

d.ChangeRelationshipState
------------------------------------------------------------------------------------------------------------------------------------------
--------------

59.Which of the following are database intialization strategies in EF Code First?

Select one or more:

a.CreateDatabaseIfNotExists----------------ans

b.MigrateDatabaseToLatestVersion

c.CustomDBInitializer--------------ans

d.AlterDatabasewithchanges

*************************************************************************************
******************************************************************************

MATHI

1) Which namespace is used to include NET data provider for SQL server?

a)System Data SqlClient ----------------Ans

b)System Data ComponentModel

c)System Data SqlProvider

d)System Data OracleClient

------------------------------------------------------------------------------------------------------------------------------------------
--------------

2) When you execute user-defined functions that return scalar values, hw are the parameters specified?

a)The argument values are enclosed in paranthesis

b)The argument values are not enclosed in paranthesis-------Ans

c)Parameter names can be specified-----------------------Ans

d)If parameter names are specified,the argument values do not have to be in the same sequence as the
parameters.........ANS
------------------------------------------------------------------------------------------------------------------------------------------
--------------

3) Which libraries are added for XSS provision?

Select one or more:

a)HTMLSerializationLibrary---------------------Ans

b)CSRFLibrary

c)AntiXSSLibrary---------------------Ans

d)SecurityLibrary---------------------Ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

4.Which statements are true about ranking functions?

Select one or more:

a.They are deterministic functions

b.They are Non deterministic functions........................ans

c.They return a ranking value for each row in a pattern.........ans

d.They return a ranking value for each table in a pattern

------------------------------------------------------------------------------------------------------------------------------------------
--------------

5. Which statements are true about a multi-statement scalar fuction?

Select one or more:

a.there is no function body,no declaration

b.The function body defined in BEGIN...END block contains a series of T-SQL statements...........ans

c.The scalar value is a result of a single statement with multi value.

d.The scalar value is a result of all the statement in the BEGIN..END block...........ans
------------------------------------------------------------------------------------------------------------------------------------------
--------------

6) LINQ to XML is based on in-memory XML programming interface

=> True-----Ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

7.You are given a task by manager to restrict the user to enter the surname which shall not be more
than 15 characters.How you will achieve this?

Select one:

a.

[StringLength(15)]

public int Sname{get;set;}

b.

[StringLength(15)]

public string Sname{get;set;} ....................................ans

c.

[Length.String.Sname(15)]

public int Sname{get;set;}

d.

[Length.String.Sname(15)]

public int Sname{}

------------------------------------------------------------------------------------------------------------------------------------------
--------------

8) Entity data model considers the business domain

=> True------Ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------
9.You are handling page event.Now the content and information you have cached so that it is loading
quickly but you need to keep the clock which shoes time for the event dynamic.

Which of the following will be helpful?

Select one:

a.<% DateTime(t.now);%>

b.<%Response.writeSubstitution(t=>DateTime.Now.ToLongTimeString());%>.................ans

c.<%var c = dynamic.DateTime() %>

d.<%session s = new session['Time'];>

------------------------------------------------------------------------------------------------------------------------------------------
--------------

10)Database model provides the normalized schema designed by the database administrator

=> True-------Ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

11)SELECT name AB object_name

.SCHEMA-NAME(schema_id) AB schema_name

.type-desc

.create_date

.modify_date

FROM sys objects

Select one or more:

a.It uses the sys.all_objects catalog view

b.It uses the sys.objects catalog view................................................................ans

c.It returns all database objects that have been modified in the last 10 years

d.It returns all database objects that have been newly added in the last 10 days................................ans
------------------------------------------------------------------------------------------------------------------------------------------
--------------

12.Return only the student name,who are having name as a"Mahesh".

Which of the following would you choose?

Select one:

a.

var query = from stu in Students

where stu.Name = "Mahesh"

select stu

b.

var query = from stu in Students

where stu.Name = "Mahesh"

select Students

c.

var query = from stu in Students

where stu.Name == "Mahesh"

select stu ---------------------------------------ANS(sure)

d.

var query = from stu in Students

where stu.Name == "Mahesh"

select Students

------------------------------------------------------------------------------------------------------------------------------------------
--------------

13)Match the following

=> Globalization is the process of = Making a product multi------Ans

=> Localization is the process of = Adapting a global product for a particular language and country---Ans
------------------------------------------------------------------------------------------------------------------------------------------
--------------

14.which of the package can be used to write an implementation for ASP.NET Identity that targets
different persistence stores such as Azure Table Storage, NoSQL databases etc..,?

Select one:

a.Microsoft.AspNet.Identity.OWIN

b.Microsoft.AspNet.Identity.Core...................ans

c.Microsoft.AspNet.Identity.Entityframework

d.Microsoft.ASPNET.Security

------------------------------------------------------------------------------------------------------------------------------------------
--------------

15.What does the following syntax do?

CREATE TABLET1(Col1 int primary key,Col2 xml)

Select one or more:

a.It creates a row in a table.

b.It creates a column of type int in the table & sets it as a primary key.

c.It creates a column of type xml.................................................ans

d.It creates an empty table................................................................?????????

------------------------------------------------------------------------------------------------------------------------------------------
--------------

16.JsonResultClass has which of the following syntax?

Select one:

a.public class JsonResult:ActionResult..........................ans

b.public class JsonResult:ActionBinder

c.public class JsonResult:ViewResult

d.private class JsonResult:ViewResult


------------------------------------------------------------------------------------------------------------------------------------------
--------------

17.Which of the folowing statement are true about AFTER trigger?

Select one:(It has to be one or more)

a.AFTER trigger executes after the statement that triggered it completes..............ans

b.AFTER trigger executes after the last trigger in the queue

c.If the statemnt fails with an error the trigger in not executed...............ans

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

------------------------------------------------------------------------------------------------------------------------------------------
--------------

18.Which of the following annotation is used to mark one or more properties to be used for concurrency
checking while user modifies in an entity?

Selct one:

a.ConcurrencyCheck..................................ans

b.DatabaseCheck

c.EntityCheck

d.None of the listed options.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

19.Which of the following are database initialization strategies in Ef Code First?

Select one or more:

a.CreateDatabaseIfNotExists.....................ans

b.MigrateDatabaseToLatestVersion

c.CustomDBinitializer......................ans

d.AfterDatabasewithchanges
------------------------------------------------------------------------------------------------------------------------------------------
--------------

20.When foreign key columns are not included in the model, the association information is managed as
an independent object.

State true or false

Slect one:

True......................ans

False

------------------------------------------------------------------------------------------------------------------------------------------
--------------

21)what are the features supported by SQLXML in SQL server?

Select one or more:

a)ability to transfor the result of a query into XML on the client side........................ans

b)ability to create an XML view of relational data by using an annoted XSD mapping schema
file..............ans

c)ability to access SQL server using HTTP.................................................................ans

D)ability to access SQL server using tcp/ip

d)Ability to expose functionality offered by stored procedures, user defined and template queries as
SOAP based web service..............ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

22)SQL server consists of which of the following three types of files

Select one or more:

a)primary data files..................ans

b)secondary data files..............ans

c)hidden files

d)log files................ans
------------------------------------------------------------------------------------------------------------------------------------------
--------------

23___________ cache until DATA IN A SQL SERVER TABLE CHANGES.

Select one:

a)key dependency

b)file dependency

c)data dependency

d)SQL dependency...................ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

24)what is meant by eagerly loading in entity framework?

Select one:

a)eager loading is the process where by a query for one type of entity also loads .................ans

related entities as part of the query

b)eager loading is the process where by a query for one type of entity also loads

related entities as part of the query on demand

c)eager loading is the process of query only the details mapped in the entity

d)none

------------------------------------------------------------------------------------------------------------------------------------------
--------------

25)savechanges() will be raised exception when which of the following object is added to the
ObjectContext and it cannot be successfully created in

the data source?

Select one:
a)DbException

b)SaveException

C)ChangeException

D)UpdateException...............................................ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

26)Which of the following statements are true about the DATABASE argument of the CREATE TRIGGER
statement?

Select one or more:

a.Applies the scope of a DDL trigger to the current database.----------------------------------Ans

b.The trigger fires whenever event_type or event_group occurs in the current database.---------Ans

c.The trigger fires whenever a new record is inserted in tables of the current database.

d.The trigger fires whenever a records are deleted from the tables in the current database.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

27)Which of the following property allows to navigate from one end to other end association?

Select one:

a.Navigation----------------------------Ans

b.Select

c.Update

d.None of the listed options

------------------------------------------------------------------------------------------------------------------------------------------
--------------

28)Which of the following is used to provide short expression for querying entities over linq?

Select one:
a.LINQ to DataSet

b.LINQ to SQL

c.Lambda expression........................ans(verify it once)

d.None of the listed options

------------------------------------------------------------------------------------------------------------------------------------------
--------------

29)Which statements are true about ROLLBACK TRANSACTION statement?

Select one or more:

a.Rolls back an implicit transaction to the beginning of the transaction,or to a savepoint inside the
transaction----------------------Ans

b.Rolls back an explicit transaction to the beginning of the transaction,or to a savepoint inside the
transaction----------------------Ans

c.It caches all data modifications&then erases from the start of the transaction or to a savepoint

d.It erases all data modifications made from the start of the transaction or to a savepoint--------------------
------------------------Ans

e.It reverses all the modifications made before the COMMIT TRANSACTION statement

------------------------------------------------------------------------------------------------------------------------------------------
--------------

30)What is meant by Materialization in entity framework?

Select one:

a.Materialization is the process of returning query results back to the client as entity types.

b.Materialization is the process of returning query results back to the client as CLR types.----------Ans

c.Materialization is the process of returning queries back to the client as CLR types.

d.None of the listed options

------------------------------------------------------------------------------------------------------------------------------------------
--------------

31)Which statements are true about DENSE_RANK function?


Select one or more:

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

------------------------------------------------------------------------------------------------------------------------------------------
--------------

32)Whenever a user searches for a product on the web page,user should get a list of products and only
that particular portion of the web page should

get updated and the whole page should not be refreshed.Which of the following will help you to achieve
this?

Select one:

a.public ActionResult Index(string query){var c=new ProductContext();var products=c.ProductSet

.Where(p=>p.Name.StartsWith(query)||query==null).OrderByDescending(p=>p.Price).Take(10).Tolist();}

b.if(Request.IsAjaxRequest()){return PartialView("productTable",products);}return
View("Index",products);

c.<% using(Ajax.BeginForm("Index","Product",new
AjaxOptions{HttpMethod="GET",UpdateTargetId="product Table"})){%><input

type="text"name="q"/><input type="submit"value="Search"/><%}%>

d.All of the listed options----------------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

33)MSC stands for which of the following?


Select one:

a.Mapping Schema Language

b.Mapping Select Language

c.Mapping Set Language

d.None of the listed options--------------------Ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

34)Which statements are true about the max constant in a varchar type?

Select one or more:

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

c.It can be used to store large blocks of text--------------------------------------------------------------------------ANS

d.It can be used to store large image types

------------------------------------------------------------------------------------------------------------------------------------------
--------------

35)IObjectContextAdapter Interface is used to:

Select one:

a.get the reference of ObjectContext from object

b.get the reference of ObjectContext from Entity

c.get the reference of ObjectContext from DBModel

d.get the reference of ObjectContext from DBContext------------------Ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------
37.WCF means__

a. windows communication Farm.

b. windows communication Forum

c. windows communication Form--------------------------------ANS

d. windows communicationFoundation

38.you are given a task by manager to check whether the given request routes to the index action of
product controller. which of the following snippets which can be helpfull?

a. [Testinitialize]public void initialize(){MyApplication>RegisterRoutes(Route


Table.Routes);}[TestMethod]public void
sample(){"~/Product".ShouldMapTo<ProductController>(z=>zIndex());}

b.public void initialixe(){MyApplication>RegisterRoutes(Route Table.Routes);}[TestMethod]public void


sample(){"~/Product".ShouldMapTo<ProductController>(z=>z Details());}

c.[Testinitialize]public void initialize(){MyApplication.RegisterRoutes(Route


Table.Routes);}[TestMethod]public void
sample(){"~/Product".ShouldMapTo<ProductController>(z=>zDetails());}------------ANS

d.[Testmethod]public void sample() {"~/Product".ShouldMapTo<ProductController>(B=>zIndex());}

------------------------------------------------------------------------------------------------------------------------------------------
--------------

39.which of the following are the data annotation attribute?

select one or more

a. stringlength--------------------------ANS

b.required--------------------ANS

c.compare
d.range

------------------------------------------------------------------------------------------------------------------------------------------
--------------

40.which of the following code can be used as an option for partial view through child request?

a. [email protected] ("sample_one","Feedback")

part2 = [ChildAction]

public actionresult sample_one()

{*..somecode..*}

b. [email protected] ("sampleone","Feedback")

part2 = [ChildActionOnly]

public actionresult sample_one()

{*..somecode..*}

c. [email protected] ("sample_one","Feedback")

part2 = [ChildActionOnly]

public actionresult sample_one() --------------------------------------ANS

{*..somecode..*}

d. None

------------------------------------------------------------------------------------------------------------------------------------------
--------------

41. which of the following are true?

I.client wins and store wins are actions which are used when concurrency happens

II. in client wins the data from the server is loaded in to your entity objects.

III. in storre wins data from the entity object is saved to the database.

select one
a.I and II

b.II and III

c.only I--------------------------------------ANS

d.I,II and III

------------------------------------------------------------------------------------------------------------------------------------------
--------------

42)We can write raw sql query in SQLQyery() method in entity framework

=> True----Ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

43.in a conceptual model which of the following are makeup from properties and define the structure of
top-level concepts?

select one.

a. object

b. database

c. entity types --------------------------------------ANS (https://msdn.microsoft.com/en-


us/library/ee382840(v=vs.110).aspx)

d. none

------------------------------------------------------------------------------------------------------------------------------------------
--------------

44.GlobalFilters.Filters.Add(new SampleFilter()); -what will the above piece of code do?

a. it will add custom filter "SampleFilter" to the GlobalFilters-----------------------ANS.

b. it will move built in sample filter to the Global filter.

c. it is not possible to add new filter , so it will give an error

d. none listed.

------------------------------------------------------------------------------------------------------------------------------------------
--------------
45. which 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

------------------------------------------------------------------------------------------------------------------------------------------
--------------

46.What are the steps for creating partition tables & indexes?

Select one or more:

a.Create a partiton function to specify how a table or index that uses the function can be partitioned-----
------------------------------------ANS

b.Create a partiton function to specify the placement of the partitions of a partition function on
filegroups

c.Create a partiton scheme to specify the placement of the partitions of a partition function on
filegroups----------------------------------ANS

d.Create a partiton scheme to specify how a table or index that uses the function can be partitioned

e.Create a table or index using the partition scheme.---------------------------------------------------------------------


--------------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

48.How to convert dbContext to object context?

Select one:

a.DbSet context =((IObjectContextAdapter)dbContext).ObjectContext;

b.ObjectContext context = ((IObjectContextAdapter)dbContext).ObjectContext;--------------------------------


ANS

c.DbContext context =((IObjectContextAdapter)dbContext).ObjectContext;


d.None of the listed options

------------------------------------------------------------------------------------------------------------------------------------------
--------------

49.Which of the following is not the Design goal of ASP.NET MVC3?

IEmbrace the Web

II.Testable

Select one :

a.I only

b.II only

c.None of the listed options---------------------------ANS

d.Both I and II

------------------------------------------------------------------------------------------------------------------------------------------
--------------

50.which of the following are the CORRECT code snippets to insert data into Employee Table using EF?

Select one:

a.Learn EFEntities db = new Learn EFEntities();

Employee objEmp = new Employee();

objEmp.HREmpId = txtHREmpId.Text;

objEmp.Firstname = txtFirstName.Text;

objEmp.Lastname = txtLastName.Text;

objEmp.Address = txtAddress.Text;

objEmp.City = txtCity.Text;

db.Employees.AddObject(objEmp);db.InsertChanges();

b.Learn EFEntities db = new Learn EFEntities();


Employee objEmp = new Employee();

objEmp.HREmpId = txtHREmpId.Text;

objEmp.Firstname = txtFirstName.Text;---------------------------------------------ANS

objEmp.Lastname = txtLastName.Text;

objEmp.Address = txtAddress.Text;

objEmp.City = txtCity.Text;

db.Employees.AddObject(objEmp);db.SaveChanges();

c.Learn EFEntities db = new Learn EFEntities();

Employee objEmp = new Employee();

objEmp.HREmpId = txtHREmpId.Text;

objEmp.Firstname = txtFirstName.Text;

objEmp.Lastname = txtLastName.Text;

objEmp.Address = txtAddress.Text;

objEmp.City = txtCity.Text;

db.Employees.AddObject(objEmp);db.acceptChanges();

------------------------------------------------------------------------------------------------------------------------------------------
--------------

51.How does partition function work?

Select one or more:

a.A partition function specifies how the table or index is partitioned------------------------------ANS

b.The function maps the database into a set of partitions.

c.The function maps the domain into a set of partitions.-----------------------ANS

d.To create a partition function,you must specify the numbers of partitions, the partitioning rows & the
number of constraints for each partition.---------------ANS

e.

------------------------------------------------------------------------------------------------------------------------------------------
--------------
52. Jameson is using a real estate website for Manhattan. He is getting the name of builders quickly
while for New York it takes time.What property of caching should be used here?

Select one:

a. Use of VaryByParam-------------------------------ANS -NOT SURE

b. Use of VaryByCustom

c. VaryByControl

d. None

53. Razor expression starts with ____.

Select one:

a. #

b. $

c. %

d. @--------------------------------------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

54. Fredrick is carrying out a TDD and is expecting ArgumentOutOfRange exception but he does not
know how to write a code to declare that an exception is expected.

To help him, which of the following would you choose?

Select one:

a. [Exception.Expected=ArgumentOutOfRange]

b. [ArgumentOutOfRangeException.Expected]

c. [ExpectedException(typeOf(ArgumentOutOfRangeException)]----------------------ANS

d. [ArgumentOutOfRange.Expected=True]

------------------------------------------------------------------------------------------------------------------------------------------
--------------
55.How can we remove pluralization in entities?

Select one :

a.modelBuilder.Conventions.Remove<PluralizingTableNameConvention>()----------------------------------------
--ANS

b.context.Conventions.Remove<PluralizingTableNameConvention>()

c.modelBuilder.Conventions.Remove<TurnOffPluralizingTableNameConvention>()

d.modelBuilder.Conventions.Remove<PluralizingTableNameEntity>()

56.JAson is tryin gto access APP Settings of "SampleserverA"& he accidentally wrote this. Var server
=ConfigurationMAnager.AppSettings["SampleServer"];

what result will he get?

Select one:

a.HE wil get an alert

b.he will get a null value back

c.He wil get a Argument Exception ------------------------------------------ANS

d.All

------------------------------------------------------------------------------------------------------------------------------------------
--------------
57.You are given a task by the manager to show the list of products from product repository .

you have wriiten a code and now you are testing whether it is showing or not.

which of the following would you choose?

select one:

a.[TestMethod]Public void Product_view_check()

var products= new LIst<Products>()

new Product {Title="Samsung"},new Product {Title="Apple"}

}.AsQueryable();

var repository = new Mock <lproductRepository>();

var controller = new ProductController(repositroy.Object);

repository.Setup(p=>p.FIndAll()).Returns(products);

var b = controller.Index().ViewData.Model

as

IENumerable<Products>Assert.IsTrue(products.SequenceEqual(B));

b.[TestMethod]Public void Product_view_check()

var products= new LIst<Products>()

{
new Product {Title="Samsung"},new Product {Title="Apple"}

}.AsQueryable();

var repository = new Mock <lproductRepository>();

var controller = new ProductController(repositroy.Object);

repository.Setup(p=>p.FIndAll()).Returns(products);

var b = controller.Index().ViewData.Model

as IENumerable<Products>Assert.IsTrue(products.SequenceEqual(b));

c.[TestMethod]Public void Product_view_check()

var products= new LIst<Products>()

new Product {Title="Samsung"},new Product {Title="Apple"}

}.AsQueryable();

var repository = new Mock <lproductRepository>();

var controller = new ProductController(repositroy.Object);

repository.Setup(p=>p.FIndAll()).Returns(products);

var z = controller.Index().ViewData.Model

as

IENumerable<Products>Assert.IsTrue(products.SequenceEqual(z));

d.none

------------------------------------------------------------------------------------------------------------------------------------------
--------------
58.AJAX helper Class exist in which namespace?

select one:

a. System.net.MVC

b. System.Web.MVC3

c. System.MVC

d. System.Web.MVC-----------------------------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

59. How can we disable proxy creation in POCO?

select one

a. Context.ContextOptions.Enabled=False;

b. Context.ContextOptions.Proxy=False;

c. Context.ContextOptions.ProxyEnabled=False;

d. Context.ContextOptions.Proxy CreationEnabled=False;--------------------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

60.which of the following id the correct option to get the related subjects count without loading it of the
student name is"vijay" ?

Select one:

a.var user = context.users.where(b=> b.name=="Vijay".FirstOrDefault();var subjectCount =


user.Subjects.Count();

b.var user = context.users.where(b=> b.name=="Vijay".FirstOrDefault();var subjectCount =


context.Entry(user).Take(b=>b.Subjects).Query().Count();

c.var user = context.users.where(b=> b.name=="Vijay".FirstOrDefault();var subjectCount =


context.Entry(user).Include(b=>b.Subjects).Query().Count();
d.var user = context.users.where(b=> b.name=="Vijay".FirstOrDefault();var subjectCount =
context.Entry(user).Collection(b=>b.Subjects).Query().Count();----------------ANS

*************************************************************************************
*****************************

PRAJAKTA

2..edmx file will create which of the following?

select one:

a.Entities & Relationships------------------ans

b.Entities & keys

c.Entities

d.None

------------------------------------------------------------------------------------------------------------------------------------------
--------------

5.In which of the following the entities and relationships are created on the EDMX design surface?

select one:

a.Code First Approach

b.Model First Approach---------------------------ans

c.Database Approach

d.None
------------------------------------------------------------------------------------------------------------------------------------------
--------------

7.What are available Database intializer in EntityFramework Code First model?

select one:

a.CreateDatabaseIfNotExists

b.DropCreateDatabaseWhenModelChanges

c.DropCreateDataabase Always

d.All-----------------------ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

8.whenever a user clicks on a product, you have to make sure to ask him/her whether he/she sure about
it or not .

which of the following would you choose ?

select one :

a.<%=Ajax.ActionLink("Click here","Sample". new AjaxOptions


(LoadingElementId="AONE",Question="Are you sure ?", Update TargetId="ProductAone",})%>

b.<%=Ajax.ActionLink("Click here","Sample". new AjaxOptions


(LoadingElementId="AONE",Confirm="Are you sure ?", Update TargetId="ProductAone",})%>---------------
ans

c.<%=Ajax.ActionLink("Click here","Sample". new AjaxOptions (LoadingElementId="AONE",Query="Are


you sure ?", Update TargetId="ProductAone",})%>

d.<%=Ajax.ActionLink("Click here","Sample". new AjaxOptions (LoadingElementId="AONE",Ask="Are you


sure ?", Update TargetId="ProductAone",})%>
------------------------------------------------------------------------------------------------------------------------------------------
--------------

11. Where can CLR functions be used?

select one or more:

a. CLR functions can be used to access external files----------------------------ans

b. CLR functions can be used to access network resources-------------------------ans

c. CLR functions can be used to configure the instance of SQL server-------------------------------ans

d. CLR functions can be used to access web services-------------------------------ans

e. CLR functions can be used to connect to other databases-------------------------------ans

12. which of the following are valid for a Contoller class?

a. Encapsulating presentation logic

b. handling all errors that might occur during the execution of the action method.-----------------ans

c. storing data in a persistent storage

d. getting the values to use as the action method's arguments------------------------------ans

(https://msdn.microsoft.com/en-in/library/dd410269(v=vs.100).aspx)

------------------------------------------------------------------------------------------------------------------------------------------
--------------

13. what are available database initializers in EntityFramework Code first model?

a. CreateDatabaseifNotExists.

b. DropCreateDatabaseWhenModelCHanges

c. DropCreateDatabaseAlways

d. All given options------------------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. <system.web>

<customErrors mode=”RemoteOnly” defaultRedirect=”Error/GeneralException”>

<errorstatuscode=”404”redirect=ErrorController.Status404”/>

</customerrors>

</system.web> --------------------------------------------------------------------------------ans

b. <system.web>

<customErrors mode=”LocalOnly” defaultRedirect=”Error/GeneralException”>

<errorstatuscode=”404”redirect=ErrorController.Status404”/>

</customerrors>

</system.web>

<system.webServer>

<httpErrorserrormode=”Detailed”/>

</system.web>

c. <system.web>

<customErrors mode=”RemoteOnly” defaultRedirect=”Error/GeneralException”>

<errorstatuscode=”404”redirect=ErrorController.Status404”/>

</customerrors>

</system.web>
<system.webServer>

<httpErrorserrormode=”Detailed”/>

</system.web>

d. <system.web>

<customErrors mode=”RemoteOnly”>

<errorstatuscode=”404”redirect=ErrorController.Status404”/>

<errorstatuscode=”GeneralException”redirect=”Error/GeneralException”/>

</customerrors>

</system.web>

<system.webServer>

<httpErrorserrormode=”Detailed”/>

</system.web>

------------------------------------------------------------------------------------------------------------------------------------------
--------------

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?

Select one or more:

a. AFTER trigger executes after the statement that triggered it completes.---------------------ans

b. AFTER trigger executes after the last trigger in the queue.

c. if 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 for views

e. AFTER triggers cannot be specified for views, they can only be specified for tables.------------------ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

29. Repeated

------------------------------------------------------------------------------------------------------------------------------------------
--------------

30. Localization is also known as.........

a. LCN

b. L10N----------------------------ans

c. All

d. LOC-zation

------------------------------------------------------------------------------------------------------------------------------------------
--------------

32.The output cache contains a different version of the requested document for each combination of
specified parameters is applicable for?

select one:
a.VaryByCustom

b.VaryByControl

c.VaryByParam-----------------------------------ans

d.VaryByheader

------------------------------------------------------------------------------------------------------------------------------------------
--------------

34(Kajal).which of the following is an example of direct mapping?

select one:

a.modeBuilder.Entity<Product>().property(p=>p.ID).DirectMap("product_id");

b.modeBuilder.Entity<Product>().property(p=>p.ID)==("product_id");

c.modeBuilder.Entity<Product>().property(p=>p.ID)=("product_id");

d.modeBuilder.Entity<Product>().property(p=>p.ID).HasCoulmnName("product_id");-----------ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

34(Prajakta). which of the following add-in is helpful in TDD?

I. coderush express

II. Test Express

a. None

b. II only

c. I only-------------------------ans

d. Both I and II
------------------------------------------------------------------------------------------------------------------------------------------
--------------

42. which of the following are valid for a controller class ?

select one or more

a.Getting the values to usse as the action methods arguments------------------------ans

b.Handling errors that might occur dring the execution of the action method--------------------ans

c.storing data in a persistent storage

d.Encapsulating presentation logic

------------------------------------------------------------------------------------------------------------------------------------------
--------------

48.Resource files have _________ extension.

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:

a.EntityCOntext

b.EntityTypeCOnfiguration ------------------------ans

c.DBContext

d.ObjectContext

------------------------------------------------------------------------------------------------------------------------------------------
--------------

57.when you are testing the value of variable "a" is not getting set and you need to have value of "a"
before stating of test.

How will you solve this error?

select one:

a."Test.Initialize" public void Initialize() {var a="sometestvalue";}

b.[Testinitialize] public void Initialize() {var a="sometestvalue";}------------------------------ans

c.[IntializeBeforeTest]public voidInitialize() {var a="sometestvalue";}

d.public void Initialize() {var a="sometestvalue";}

*************************************************************************************
*************

MEDHAVI's MVC Attempt

3.Which of the following statements is used to fetch an entity using composite key?
Select one:

a.context.MyDbSetTableEntity.Find(key1,key2)----------------------------------------------------------------------------
---------ans

b.context.MyDbSetTableEntity.Take(key1,key2)

c.context.MyDbSetTableEntity.Include(key1,key2)

d.context.MyDbSetTableEntity.GetEntityKey(Obj)

------------------------------------------------------------------------------------------------------------------------------------------
--------------

4.While testing,you are using dynamically generated test double.Which type of test double it is?

Select one:

a.Stubs -----------------------------------------------------------------------------------------------------------ans

b.Fakes

c.None of the listed options

d.Mocks

------------------------------------------------------------------------------------------------------------------------------------------
--------------

6.Which of the following namespace supports code-first conventions?

Select one:

a.System.Data.Entity

b.System.Data.ComponentModel

c.System.Data.Entity.ModelConfiguration.Conventions -----------------------------------------------------------------
----------ans

d.None of the listed options

------------------------------------------------------------------------------------------------------------------------------------------
--------------
7.What is "ExcuteStoreCommand" method?

Select one:

a.Run SQL statements in an Entity framework environment

b.Stores values in the model

c.excute xml data

d.None of the listed options.-------------------------------------------------------------------------ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

8.What is the purpose of key annotation?

Select one:

a.To set the columns as Unique

b.To set the columns as required

c.To set the columns as primary key------------------------------------------------------------------------ans

d.To set the columns as foreign key

------------------------------------------------------------------------------------------------------------------------------------------
--------------

10.Which statement are true about Global Temporary stored procedure?

Select one or more:

a.A Global temporary procedure is available to all connections.-------------------------------------------------------


------------------------------------------ans

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

e.If a global temporary procedure is created,all users with EXCUTE permissions can access it &
permissions can also be revoked explicitly.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

15.You want a particular section of your site to be accessed by "Admins" only.Which of the following is
the correct option to go about it?

Select one:

a.Allow=Admins

b.Access="Admins"

c.Authorize(Roles=Admins")-----------------------------------------------------------------------------------------------------
-----------------------ans

d.(Authorize="Admins")

------------------------------------------------------------------------------------------------------------------------------------------
--------------

17.What will be the order of TDD steps:

I.Write enough code so that it passes the test.

II.Write a unit test.

III.Run the test again to watch it pass.

IV.Watch it fail.

Select one:

a.II,IV,I,III----------ans

b.III,I,II,IV

c.IV,I,II,III

d.II,I,IV,III
------------------------------------------------------------------------------------------------------------------------------------------
--------------

19.ajaxStart(callback)-What is the function of this method?

Select one:

a.Attach a class library to be executed, whenever an AJAX reqest begins and there is more tahn one
active.

b.Attach a header to be executed,whenever an AJAX reqest begins and there is none already active.

c.Attach a function to be executed,whenever an AJAX reqest begins and there is none already active.----
----------ans

d.Attach a method to be executed,whenever an AJAX reqest begins and there is none already active.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

23.What does the following Query do?

INSERT INTO docs

SELECT 10,xCol FROM (SELECT * FROM OPENROWSET(BULK 'C:\temp\xmfile.xml',SINGLE_BLOB)AS


xCol)AS R(xCol)

Select one:

a.It is typed XML insert statement.

b.Strong XML Data Generated Using FOR XML with TYPE Directive

c.A new row is inserted into the table named docs-------------------------------------------------------------------ans

d.Querying and Modifying XML Data.

Note:The INSERT statement in the following code segment reads the content of file C:\temp\xmlfile.xml
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.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

24.Which of the following statements are TRUE?

I.Multiple entity sets can be defined using the same entity type.

II.An instance of a given type can only exist in one entity set.

III.The entity key for the instance may not unique within the entity set.

Select one:

a.I and II-----------------------------------------------------------------------------ans

b.II and III

c.I and III

d.I,II and III

Note:The entity key for the instance is unique within the entity set.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

26.How can we set primary key explicitly for an entity?

Select one:

a.ModelBuilder.CreateKey<Entity>(t=>t.keyColumnYouWant);

b.modelBuilder.Entity<Entity>().HasKey(t=>t.keyColumnYouWant);--------------------------------------------------
---ans

c.ModelBuilder.Key<Entity>(t=>t.keycolumnYouWant);

d.None of the listed options.

------------------------------------------------------------------------------------------------------------------------------------------
--------------
27.Eager loading is the process of loading related entites/objects.

State True or False

Select one:

True-----------------------------------------------ans

False

------------------------------------------------------------------------------------------------------------------------------------------
--------------

32.You need to install A but it requires B.In this scenario,what will the Nuget download?

Select one:

a.Only A

b.It will throw an error------------------------------------------------ans(build error will be thrown)

c.A & B

d.Only B

------------------------------------------------------------------------------------------------------------------------------------------
--------------

34.In which of the following options, Aggregate functions be used as Expressions?

Select one or more:

a.The select list of a SELECT statement(either a subquery or an outer query) --------------------------------------


-----------ans

b.A COMPUTE or COMPUTE BY clause

c.A GROUP BY clause

d.A HAVING clause--------------------------------------------------------------------------------------------ans


e.An OVER clause

------------------------------------------------------------------------------------------------------------------------------------------
--------------

36.Entity Framework(EF) is an Object/Relational mapping

State True or False

Select one:

True--------------------------------------------------------------------------------------------true

False

------------------------------------------------------------------------------------------------------------------------------------------
--------------

39.Commands on console are implemented as powershell command.

State True or False.

Select one:

True-------------------------------------------------------------------------------------------ans

False

------------------------------------------------------------------------------------------------------------------------------------------
--------------

40.Which of the following options are CORRECT about entity relationships?

I.n Entity Framework, an entity can be related to other entities through an association(realtionship)

II.Each 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:

a.Only I
b.Only II

c.Neither I nor II

d.Both I and II.-----------------------------------------------------------------------------------------------------------------------


-----------------------ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

42.Code-First will create the database tables with the name of_________ properties in the context class.

Select one:

a.Entity

b.Oject

c.Model

d.Dbset--------------------------------------------------------------------------------------------------------------------ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

43.What do you understand by RAW ajax?

Select one:

a.To communicate to business server making the use of "XMLHTTPREQUEST"

b.To communicate to database server making the use of "XSLREQUEST"

c.To communicate to client server making the use of "XMLHTTPREQUEST"

d.To communicate to database server making the use of "XMLHTTPREQUEST"-----------------------------------


---------------------------------ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

45.HTML helpers Supports the rendering of HTML controls in a view.


State True or False.

Select one:

True-----------------------------------------------------------------------------------------------ans

False

------------------------------------------------------------------------------------------------------------------------------------------
--------------

49.We can have more than 1 Web.config file in ASP.NET MVC3

State true or False

Select one:

True-----------------------------------------------------------------------------------------------ans

False

Note:By creating web.config file in sub root folders we can use multiple web.config

files in our application but each folder should contains only one web.config file.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

53.Razor view files have Extention_____________.

Select one:

a.cshtml------------ans

b.csxml

c.csxss

d.csaspx

------------------------------------------------------------------------------------------------------------------------------------------
--------------

56.Which of the following options are CORRECT about data annotations?


Select one:

a.DataAnnontations 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.

b.With DataAnnotations you can not only drive database schema generation, but you can also map your
code first classes to a pre-existing database.

c.DataAnnotations provide only the most commonly needed configuration changes you can be make on
your code first classes.

d.All the listed options-------------------------------------------------------------------------------------------------------------


-------------------ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

57.What does the Query exeuction plan define?

Select one or more:

a.The sequence in which the source tables are accessed.----------------------------------------------------------------


-----------ans

b.The sequence in which the rows are accessed.

c.The methods used to extract data from each table----------------------------------------------------------------------


-------------ans

d.The methods used to arrange data from each table.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

58.Which of the following line of code will invoke the cart controllers ad method?

Select one:

a.return redirect("Cart/Add")

b.return View("Cart.Add")-----------------------------------------------------------------ans

c.return Content("Cart.Add")
d.Response.Redirect("Cart.aspx?Add")

------------------------------------------------------------------------------------------------------------------------------------------
--------------

59.If foreign key columns are not avaliable in the model, the relationships

are reffered with the object references instead of foreign key properties.What is this association
called?

Select one:

a.Independent association---------------ans

b.Dependent association

c.Relationship

d.EntityRelationship

*************************************************************************************
*****************************************************

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?

a. var user = context.Users

.Where(b => b.Name !="Raja")

.Take(b => b.roles)

.FirstOrDefault();

b. var user = context.Users

.Where(b => b.Name =="Raja")


.Select(b => b.roles)

.FirstOrDefault();

c. var user = context.Users

.Where(b => b.Name =="Raja")....................................ans

.Include(b => b.roles)

.FirstOrDefault();

d. var user = context.Users

.Where(b => b.Name ="Raja")

.Take(b => b.roles)

.FirstOrDefault();

------------------------------------------------------------------------------------------------------------------------------------------
--------------

2) Which namespace is used to handle EntityClient provider?

a. System.Data.Annotations

b. None of the listed options

c. System.Transactions

d. System.Data.EntityClient.....................ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

3) Which of the following Entity will create a table with the following specifications:

I. It should have FirstName and should be required

II. It should have LastName and should be required

III. Full Name must be FirstName LastName


iV. EmployeeID should be primary key

V. It should have DepartmentID

VI. Department Entity should be lazy loading

a. public class Employee

b. public class Employee

[key]

public string EmployeeID {get;set;}

public string FirstName {get;set;}

[DatabaseGenerated(DatabaseGeneratedOption.Computed)]

public string FullName

get{ return FirstName +"."+LastName;}

public string DepartmentID{get;set;}

public virtual Department Department{get;set;}.....................................................ans

c. public class Employee

[key]

public string EmployeeID {get;set;}

public string FirstName {get;set;}

public string FullName {get;set;}

public string DepartmentID {get;set;}


public Department Department{get;set;}

d. public class Employee

public string EmployeeID {get;set;}

public string FirstName {get;set;}

public string FullName {get;set;}

public string DepartmentID {get;set;}

public Department Department{get;set;}

e. public class Employee

[key]

public string EmployeeID {get;set;}

public string FirstName {get;set;}

public string DepartmentID {get;set;}

public Department Department{get;set;}

------------------------------------------------------------------------------------------------------------------------------------------
--------------

4) What is meant by eagerly loading in entity framework?

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

c. None of the listed options

d. Eager loading is the process of query only the details mapped in the entity

------------------------------------------------------------------------------------------------------------------------------------------
--------------

5) DdContext is just a lightweight version of the ObjectContext class.

a. True.................................ans

b. False

------------------------------------------------------------------------------------------------------------------------------------------
--------------

6) What is meant by Materialization in entity framework?

a. Materialization is the process of returning queries back to the client as CLR types

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...................ans

d. None of the listed options

7) How to set maximum length for a column using entity framework?

a. modelBuilder.SetLength<Entity>().Property(t => t.Name).HasMaxLength(50)


b. modelBuiler.Entity<Entity>().Property(t => t.Name).HasMaxLength(50)..................---------------------------
--------.....ans

c. moderlBuilder.SetMaxLength<Entity>().Property(t => t.Name).HasMaxLength(50)

d. None of the listed options

------------------------------------------------------------------------------------------------------------------------------------------
--------------

8) Which of the following statements are TRUE?

I. context.Configuration.ProxyCreationEnabled should be true.

II. context.Configuration.LazyLoadingEnabled should be true.

III. Navigation property should be defined as public, virtual. Context will NOT do lazy loading if the
property is not defined as virtual.

a. I,II and III.......................ans

b. II and III

c. I and III

d. I and II

Note:

Rules for lazy loading:

context.Configuration.ProxyCreationEnabled should be true.

context.Configuration.LazyLoadingEnabled should be true.

Navigation property should be defined as public, virtual. Context will NOT do lazy loading if the property
is not defined as virtual.

9) Entity Framework will support in web services and WCF.


State True or False.

a. True .......................ans

b. False

------------------------------------------------------------------------------------------------------------------------------------------
--------------

10) LINQ to XML is based on in-memory XML programming interface.

State True of False

a. True ...................ans

b. False

------------------------------------------------------------------------------------------------------------------------------------------
--------------

11) How can we stop auto detection change in entity framework?

a. context.Configuration.AutoDetectChangesDisable = false;

b. context.Configuration.AutoDetectChangesEnabled = false;...........................ans

c. context.Configuration.AutoDetectChangesEnabled = true;

d. context.Configuration.AutoDetectChangesDisable = 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
d. None of the listed options

------------------------------------------------------------------------------------------------------------------------------------------
--------------

13) DbContxt.ChangeTracker 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?

I. public class Context: DbContext

public Context(): base()

II. public class Context: DbContext

public Context(): base("DB Name")

}
III. public class Context: DbContext

public SchoolDBContext(): base("name=EduDB")

a. I,II and III

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 EntityState.

Modified from EntityState.Unchanged.

state True or False

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
Note:1.CreateDatabaseIfNotExists 2.DropCreateDatabaseIfModelChanges 3.DropCreateDatabaseAlways
4.Custom DB Initializer are the 4 DB initializer

------------------------------------------------------------------------------------------------------------------------------------------
--------------

17) Which of the following is CORRECT for the sql implementation of the below linq query from s in
context.Students from c in s.Courses where s.StandardId == 1 select new {s.Student,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]

INNER JOIN[dbo].[Course]AS[Extent3]ON[Extent3].[CourseId] = [Extent2].[CourseId] ) AS


[Join1]ON[Extent[1].[StudentID] = [Join1].[StudentId]

WHERE 1 = [Extent1].[StandardID]

b.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]

[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]

OUTER JOIN[dbo].[Course]AS[Extent3]ON[Extent3].[CourseId] = [Extent2].[CourseId] ) AS


[Join1]ON[Extent[1].[StudentID] = [Join1].[StudentId]

WHERE 1 = [Extent1].[StandardID]

c. None of the listed options

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]
OUTER JOIN[dbo].[Course]AS[Extent3]ON[Extent3].[CourseId] = [Extent2].[CourseId] ) AS
[Join1]ON[Extent[1].[StudentID] = [Join1].[StudentId]

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

------------------------------------------------------------------------------------------------------------------------------------------
--------------

19) Which of the following are the attributes of System.ComponentModel.DataAnnotations.Schema


class?

a. ForeignKey .......................ans

b. Model

c. Column .......................ans

d. Entity

------------------------------------------------------------------------------------------------------------------------------------------
--------------

20) Which of the following are the benefits of Entity framework?

a. Mapping manual

b. None of the listed options----------ans

c. Auto generate code

d. Reducing development time

------------------------------------------------------------------------------------------------------------------------------------------
--------------
21) In Lazy loading, the navigation property has to be declared as:

a. public.............ans

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

b. All of the listed options

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

c. All of the listed options

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.
CLR types supported by 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

b. None of the listed options

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)

which are independent of any specific persistence technology.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

28) How can we disable proxy object creation in POCO?

a. context.ContextOptions.ProxyCreationEnabled = false;................ans

b. context.ContextOptions.ProxyEnabled = false;

c. context.ContextOptions.Enabled = false;

d. context.ContextOptions.Proxy = 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

------------------------------------------------------------------------------------------------------------------------------------------
--------------

30) How can we Update UnitPrice of Product?

a. NorthwindEntities dbContext = new NorthwindEntities();

Product product = dbContext.ProductSet.Single( p=> p.ProductName == "Aniseed Syrup");

product.UnitPrice = 1000;

dbContext.Update();

b. NorthwindEntities dbContext = new NorthwindEntities();

Product product = dbContext.ProductSet.Single( p=> p.ProductName == "Aniseed


Syrup");............................................ans

product.UnitPrice = 1000;

dbContext.SaveChanges();

c. NorthwindEntities dbContext = new NorthwindEntities();

Product product = dbContext.ProductSet.Single( p=> p.ProductName == "Aniseed Syrup");

product.UnitPrice = 1000;

dbContext.UpdateChanges();
d. NorthwindEntities dbContext = new NorthwindEntities();

Product product = dbContext.ProductSet.Single( p=> p.ProductName == "Aniseed Syrup");

product.UnitPrice = 1000;

dbContext.Save();

------------------------------------------------------------------------------------------------------------------------------------------
--------------

31.which of the following is used to manipulating dataset using linq?

a.LINQ to dataset.....................ans

b.none of these

c.LINQ TO SQL

d.LINQ TO XML

------------------------------------------------------------------------------------------------------------------------------------------
--------------

32.a POCO class will not be inherited from entity object class

state true or false

a.true.....................ans

b.false

------------------------------------------------------------------------------------------------------------------------------------------
--------------

33.database model provides the normalised schema designed by the database administrator

state true or false

a. true .................ans

b.false

------------------------------------------------------------------------------------------------------------------------------------------
--------------
34.when you use the using statement,then compiler automatically creates a try/finally block and calls
dispose in the finally block.

state true or false

a.true....................ans

b.false

------------------------------------------------------------------------------------------------------------------------------------------
--------------

35.which of the following property is used to map two seperate types in the storage model?

select one

a.split entity...................ans

b.scalar property

c.association

d.none 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.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

36.which namespace is used to include .net data provider for sql server?

a.system.data.sqlprovider

b.system.data.oracleclient

c.system.data.componentmodel

d.system.data.sqlclient....................ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

37.POCO templateused to generate which of the following?


select one

a.none of these

b.persistance ignorant modeltypes

c.persistance ignorant entity types.........................anss

d.persistance ignorant object types

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.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

38.entity model support quering only entities defined in entity datamodel

state true or false

a. true

b.false

Note:The Entity Framework even supports mapping entities in the conceptual model to stored
procedures in the data source.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

39.when the foreign key columns are not included in the model,the association information is
managedas an independent object

state true or false

a.true......................ans

b.false
40.entity framework supports automatic change tracking of the loaded entities during the life time of
the context

state true or false

a.true...........................ans

b.false

------------------------------------------------------------------------------------------------------------------------------------------
--------------

41.what is the purpose of the sysytem.componentmodel.dataannotation namespace?

select one

a.none of these

b.data first approach to use [key] attribute

c.code first approach to use [key] attribute...........................ans

d.model first to use [key] attribute

------------------------------------------------------------------------------------------------------------------------------------------
--------------

42.how can we mark properties in the entity framework to be ignored?

select one

a.[remove]

b.[ignored]

c.[notmapped]..........................ans

d.none of these

------------------------------------------------------------------------------------------------------------------------------------------
--------------

43.which of the following statements are TRUE?

I.in an entity framework application data is loaded from the file with the extension.csdl

II.mapping information is publicaly accessible


III.the entity framework uses the metadata in the mapping types to translate queries against the
conceptual model to data source specific commands

select one:

a.II & III

b.I & II

c.I.II & III

d.I & III..............................ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

44.savechanges() will be raised exception when which of the following object is added to the
objectcontext and it cannot be successfully created in the data source?

select one:

a.saveexception

b.changeexception

c.updateexception..............................ans

d.DBexception

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

------------------------------------------------------------------------------------------------------------------------------------------
--------------

45.when a linq entities query is excecuted.

select one:

(ans) a.some expressions in the query might be executed on the server and some parts might be
executed locally on the client.client-side evaluaion of an expression takes place before the query is
executed on the server...................ans
b.some expressions in the query might be executed on the server and some parts might be executed
locally on the server.client-side evaluaion of an expression takes place before the query is executed on
the server.

c.none of these

d.some expressions in the query might be executed on the server and some parts might be executed
locally on the client.server-side evaluaion of an expression takes place before the query is executed on
the server.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

46.which of the following annotation validates property whether it has minimum length of the array or
string?

select one:

a.none of these

b.arraylength

c.minlength...........................ans

d.lengthofarray

47.table splitting enables which of the following?

select one:

a.to map two tables to multiples entities

b.to map a single table to multiple entities..........................ans

c.to map a single entity to multiple tables

d.to map a single schema to multiple entities

------------------------------------------------------------------------------------------------------------------------------------------
--------------

48.how can we enable concurrency mode in entity framework?

select one:

a.<property name="status" type="byte" nullable="false" concurrencymode="true"/>

b.<property name="status" type="byte" nullable="false" concurrencymode="enabled"/>


c.<property name="status" type="byte" nullable="false" concurrencymode="yes"/>

d.<property name="status" type="byte" nullable="false"


concurrencymode="fixed"/>.............................ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

49.the ____________ class supports both LINQ to entities and entitySQL queries against a conceptual
model.

select one:

a.entitytosql..............................ans(may be)

b.none of these

c.objectquery

d.sqlquery

------------------------------------------------------------------------------------------------------------------------------------------
--------------

50.which of the following is true about overlapping keys?

select one:

a.to change a foreign key association that includes overlapping keys,it is recommend to modify the
foreign key values instead of using the object references.

b.overlapping keys are composite keys where some properties in the key are also part of another key in
the entity

c.all of these.............................................................ans

d.you cannot have an overlapping key in an independent association

51.which 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:

a.concurrencycheck......................ans

b.none of these

c.entitycheck
d.databasecheck

------------------------------------------------------------------------------------------------------------------------------------------
--------------

52.which class is responsible for interacting data as object in the entity framework?

select one:

a.entity

b.entitycontext

c.DBset

d.DBcontext........................ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

53.which of the following option is CORRECT about navigation property?

select one:

a.navigation properties provide a way to navigate an association between two entity types.

b.every object can have a navigation property for every relationship in which it participates.

c.navigation 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)

d.all of these.................ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

54.which annotation is used when you have multiple relationships between classes?

select one:

a.onmultiplerelation

b.required

c.foreign key

d.inverse property.......................ans
55.entity state property is enum type

state true or false

select one:

a.true.................................ans(may be)

b.false

------------------------------------------------------------------------------------------------------------------------------------------
--------------

56.how can we get objectcontext from DBcontext?

select one:

a.DBcontext.context

b.DBcontext.getobjectcontext()

c.none of these

d.((lobjectcontextadaptor)db).objectcontext;.......................ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

57.which of the following is the fullform of CSDL?

select one:

a.conceptual set definition language

b.conceptual schema definition language............................ans

c.conceptual select definition language

d.conceptual selectdata definition language

------------------------------------------------------------------------------------------------------------------------------------------
--------------

58.find the correct code to execute sql raw query in the entity frameqwork from the following

select one:

a.using(var ctx = new schoolDBentities())


{

varstudentlist = ctx.students.sql("select*from student").tolist<student>();

b.none of these

c.using(var ctx = new schoolDBentities())

varstudentlist = ctx.students.execute("select*from student").tolist<student>();

d.using(var ctx = new schoolDBentities())

varstudentlist = ctx.students.sqlquery("select*from
student").tolist<student>();...............................ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

59.which of the following statements are true?

I.the compiled query class provides compilation and caching of queries for reuse

II.execute method is to created a new delegates 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.II & III

b.I,II & III......................ans

C.I & III

d.I & II

------------------------------------------------------------------------------------------------------------------------------------------
--------------
60.which of the following provider is used to access data in the conceptual model?

select one:

a.sqlclientprovider

b.entitycontexy

c.entity model provider

d.entity client provider......................ans

*************************************************************************************
************************************************************************

Sanskar MVC 1st Attempt

sanskar mvc qstns :

1)which data types cannot be return types of scalar function?

a)text------------ans

b)ntext------------------ans

c)integer

d)image---------------------ans

e)cursor-------------ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

2)which class provides the rsults by executing command in conceptual model?

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

with your data model?

a)entityobject

b)dbcontext.context

c)poco------------------------------ANS

d)none

------------------------------------------------------------------------------------------------------------------------------------------
--------------

4)razor syntax have intellisense

true or false

true------ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

5)how do aggregate functions work?

a)they work only on integer values

b)they ignore null values----------------ans

c)they perform a calculation on a set of values and return a single/summarized value------------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

------------------------------------------------------------------------------------------------------------------------------------------
--------------

6)how does external_access permission set work?

a)allow access only to external assemblies with minimal access to internal computation

b)allows access to internal computations


c)allow access to external system resource such as files,networks and environment variables----------------
ans

d)allow access to registry----------------ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

7)what does linq to sql do?

a)it enables you to query data using datacontext

b)it provides tightly coupled approach

only 1

only 2

both 1 and 2----------ans

none

------------------------------------------------------------------------------------------------------------------------------------------
--------------

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

------------------------------------------------------------------------------------------------------------------------------------------
--------------

9)what is the significance of instead of argument of the create trigger statement?

a)specifies that the DML trigger is executed instead of the triggering sql statement

b)it overrides the actions of the triggeering statements------------------ANS


c)it can be specified for DDL or logon triggers----------------ANS

d)it can not be specified for DDL or logon triggers

------------------------------------------------------------------------------------------------------------------------------------------
--------------

10)what will be the output of the following code:-

public actionresult search(string idea ="a"){

return view();

1)it will set the default value of string idea to "a"

2)it will set the default pointer of idea to "a"

only 1--------------------------------------------------ANS

only 2

both 1 and 2

none

------------------------------------------------------------------------------------------------------------------------------------------
--------------

11)what are the query considerations for using clustered indexes?

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

c)use clustered index when a query needs to handle null values

d)use clustered index when a query uses join clauses--------------ans

e)use clustered index when a query uses group by or order by clauses-----------ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

12)The _______________class supports both linq to entities sql queries agaimst a conceptual model

a)sqlquery
b)objectquery-------------------ans

c)entitytosql

d)none

------------------------------------------------------------------------------------------------------------------------------------------
--------------

13)TDD uses ________________to drive the design of software?

a)red-green-refractor----------------------------------------------------ANS

b)unit debug

c)unit test

d)regression test

------------------------------------------------------------------------------------------------------------------------------------------
--------------

14)which of the followin are true?

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

b)the lifetime of the context begins when the application starts

c)the primary class that is responsible for interacting with data as objects is
system.data.entity.dbcontext------ans

d)dB ENTITY PROPERTIES repersent collections of the specified entites in the context

------------------------------------------------------------------------------------------------------------------------------------------
--------------

15)Nunit have many dependencies

true or false

ANS:true

------------------------------------------------------------------------------------------------------------------------------------------
--------------
16)what is the significance of the results pane of the query designer?

a)it shows a grid with data retrieved by the query or view----------------------------------------------------ans

b)it shows the results of the most recently executed select query-------------------------------------------------
ans

c)it shows the query syntax

d)you can modify the database by editing values in the cells of the grid---------------------------------------------
-ans

e)you can add or delete rows----------------------------------------------------------------------------------------------ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

17)entitystate property is enum type.

true or false

true-----ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

18)what should be tested a controller?

1)proper actionresult are returned or not

2)proper model are build or not

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 blog.which of the followin is the correct snippet?

a)protected override void OnModelCreating(DbModelBuilder


modelBuilder){modelBuilder.Entity<Blog>().HasRequired(e=>e.BlogAbout).WithRequiredPrincipal();mod
elBuilder.Entity<Blog>().ToTable("Blogs");modelBuilder.Entity<BlogAbout>().ToTable("Blogs");}

b)protected override void OnModelCreating(DbModelBuilder


modelBuilder){modelBuilder.Entity<Blog>().ToTable("Blogs");modelBuilder.Entity<BlogAbout>().ToTable
("Blogs");}------------------------------------------------------------------------------------------------ANS

c)protected override void OnModelCreating(DbModelBuilder


modelBuilder){modelBuilder.Entity<Blog>().HasRequired(e=>e.BlogAbout).WithRequiredPrincipal();}

d)protected override void OnModelCreating(DbModelBuilder


modelBuilder){modelBuilder.Entity<Blog>().HasRequired(e=>e.BlogAbout)modelBuilder.Entity<Blog>().T
oTable("Blogs");modelBuilder.Entity<BlogAbout>().ToTable("Blogs");}

------------------------------------------------------------------------------------------------------------------------------------------
--------------

21.----improves the performance of ASP.NET MVC application drastically.

a.Output profiling

b.Output Regeneration

c.Output updation

d.output caching----------------------------------------------------------------------------ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

22.Which of the following argument of the CREATE TRIGGER statement specifies

the security context under which the trigger is executed?

a.ALL SERVER
b.WITH ENCRYPTION

C.EXECUTE AS--------------------------------------------------------------------------------ans

D.INSTEAD OF

------------------------------------------------------------------------------------------------------------------------------------------
--------------

23.How can we disable proxy object creation in POCO?

a.context.ContextOptions.Enabled=false;

b.context.ContextOptions.Proxy=false;

c.context.ContextOptions.ProxyEnabled=false;

d.context.ContextOptions.ProxyCreationEnabled=false;-----------ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

24.Which of the package can be used to write an implementation for ASP.NET Identity

that targets different persistence stores such as Azure Table storage.NoSQL database etc

a.Microosoft.asp.net identity.OWIN

b.Microosoft.asp.net security

c.Microosoft.asp.net identity.core---------ans

d.Microosoft.asp.net identity.EntityFramework

25.Which of the following statements are TRUE?(MULTIPLE ANS)

I.edmx file is an XML.file

II.which declares a conceptual model,storage model and mapping between these models

III.It divided into three categorieS SSDL,CSDL and MSL

Select one:

a.I and II

b. II and III
c. I and III

d.I,II and III------------------------------------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

26.You dont want to allow anyone to do any change to the code being deployed on

production server.what will be the solution?

a.Uncheck "Allow this precompiled site to update" under Output Assemblies-->Compilation-----------------


----ANS

b.Uncheck "Allow this precompiled site to update" under configuration-->Compilation

c.Uncheck "Allow this precompiled site to update" under signing-->Compilation

d.Uncheck "Allow this precompiled site to update" under deployment-->Compilation

------------------------------------------------------------------------------------------------------------------------------------------
--------------

27.You have a certain number of products with price ranging from high to low to medium. You

want to filter products by their respective price range.Which of the following option

will fulfill this conditions?

a.[...

@using(Html.BeginForm("index","Range"))

Html.DropDownList("Product",new selectList(viewBag.Ranges))

<input type="submit" value="filter"/>

...]

b.[...

@using(Html.BeginForm("index","Product"))

Html.DropDownList("Range",new selectList(viewBag.Ranges))
<input type="password" value="filter"/>

...]

c.[...

@using(Html.BeginForm("index","Product"))

Html.DropDownList("Range",new selectList(viewKnapsack.Ranges))

<input type="submit" value="filter"/>

...]

d.[... ------------------------------------------------------------------ANS

@using(Html.BeginForm("index","Product"))

Html.DropDownList("Range",new selectList(viewBag.Ranges))

<input type="submit" value="filter"/>

...]

------------------------------------------------------------------------------------------------------------------------------------------
--------------

28.You are given a task by your manager that includes assembly binding. Which file

would you configure?

a.system.configuration

b.web.config

c.machine.config------------------------------------ANS

d.config.config
29.what happens when you create a primary key constraint?

a.Unique index on the column ,or columns is automatically created which is by default nonclustered

b.Unique index on the column ,or columns is automatically created which is by default clustered-----------
-----------ANS

c.Unique index on the column ,or columns is automatically created which is by default spatial

d.Unique index on the column ,or columns is automatically created which is by default XML

------------------------------------------------------------------------------------------------------------------------------------------
--------------

30.which of the following keyword is used for lazy loading related data in entity framework?

a.protected

b.virtual----------------------ANS

c.const

d.abstract

------------------------------------------------------------------------------------------------------------------------------------------
--------------

31.what is stored procedure? choose all relevant options

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

accessible by DQL server

c.commands placed in a stored procedure are interpreted one line at a time during execution

d,commands placed in a stored procedure are executed as one batch----------------------------------------------


ans

e.stored procedures reduce network traffic---------------------------------------------ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

32.which command will remove the package


a.uninstall-package packagename ---------------------------------------------------------------------------ans

b. delete package

c.remove packagename

d.none of the lists

Ref Link: http://stackoverflow.com/questions/17653633/uninstall-entityframework-using-the-package-


manager-console

33.choose 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;

Distance d1=new Distance("A1",total_distance); --------------------------------------------------------------------------


-ans

d1.covered(distance_covered);

int Left=d1.remaining;

Assert.AreEqual(distance_left,Left);

b.[TestMethod]

int total_distance=2;

int distance_covered=10;

int distance_left=10;

Distance d1=new Distance("A1",total_distance);

d1.covered(distance_covered);

int Left=d1@remaining;
Assert.AreEqual(distance_left,Left);

c.All of the lists

d.[TestMethod]

int total_distance=2;

int distance_covered=10;

int distance_left=10;

Distance d1=new Distance("A1",total_distance);

d1.covered(distance_covered);

int Left1=d1.remaining;

Assert.AreEqual(distance_left,Left);

------------------------------------------------------------------------------------------------------------------------------------------
--------------

34.BindModel(ControllerContext.ModelBindingContext)- this is correct for the BindModel method

a.True ---------------------------------------------------------------------------ans

b.False

------------------------------------------------------------------------------------------------------------------------------------------
--------------

35.

36.which class is used to execute an entity SQL command against an entity mode?

a.EntityCommand ---------------------------------------------------------------------------ans

b.EntityConnection

c.sqlCommand
d.None of the lists

------------------------------------------------------------------------------------------------------------------------------------------
--------------

37.proxy objects can be serialized and deserialized with binary serialization

a.true ---------------------------------------------------------------------------ans

b.false

------------------------------------------------------------------------------------------------------------------------------------------
--------------

38.If we use database first generation a DbContext is generated by default

a.True---------------------------------------------------------------------------ans

b.False

------------------------------------------------------------------------------------------------------------------------------------------
--------------

39.SQL server 2008 security model is based on three categories that seperate

the basic elements of security.Which among the following are those?(Multiple ans)

a.Principles ---------------------------------------------------------------------------ans

b.Constraints

c.Securables ---------------------------------------------------------------------------ans

d.Permissions ---------------------------------------------------------------------------ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

40.How is the support for XML integrated into SQL server?(multiple ans)

a.Support for the xml data type ---------------------------------------------------------------------------ans

b.Ability to specify an XQuery against XML data stored in columns and variables of the xml type------------
--------ans

c.Ability to handle bulk loading of xml data ---------------------------------------------------------------------------ans


d.ability to merge xml

------------------------------------------------------------------------------------------------------------------------------------------
--------------

Q.41 which of the following is the default database initializer in entity framework?

a CreateDatababaseifnotexists ---------------------------------------------------------------------------ans

b DropCreateDatabaseifModelChanges

c DropCreateDtabaseAlways

d DropDtabaseAlways

------------------------------------------------------------------------------------------------------------------------------------------
--------------

Q42 Which namespace is used to handle EntityClient provider?

a System.Data.EntityClient ---------------------------------------------------------------------------ans

b System.Transactions

c System.Data.Annotations

d None of the listed options

------------------------------------------------------------------------------------------------------------------------------------------
--------------

Q.43 We can create entity framework without existing database

State True or False

a True-------------------------ans

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

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.

c A clustered index is implemented as a B-tree index structure.-----------------------------------ans

d A clustered index is implemented as a Linked -list structure.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

Q.45 Entity Framework provide us with which of thefollowing attribute to indicate multiple relationships

between two tables?

a [InsertProperty]

b [InverseProperty]-------------------ans

c [InProperty]

d None of the listed options

------------------------------------------------------------------------------------------------------------------------------------------
--------------

Q.46 Conceptual model properties are not same as the properties created in .edmx file. State True or
False

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

------------------------------------------------------------------------------------------------------------------------------------------
--------------
Q.48 Commands on console are implemented as powershell command.

State True or False

a True-------------------ans

b False

Q.49 GlobalFilters.Filters.Add(new SampleFilter()); - What will the above piece of code do?

a It is not possible to add new filter,so it will give an error.

b It will add customer filter "SampleFilter" to the GlobalFilters.-------------------ans

c None of the listed options

d It will move built insample filter to the Global Filter.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

Q.50 Repeated

Q.51 How can we insert Products with new Category?

a NorthwindEntities dbContext = new NorthwindEntities();("same everywhere only last line


changes")dbContext.SaveChanges();-------------------ans

b NorthwindEntities dbContext = new NorthwindEntities();("same everywhere only last line


changes")dbContext.AddChanges();

c NorthwindEntities dbContext = new NorthwindEntities();("same everywhere only last line


changes")dbContext.InsertChanges();

d NorthwindEntities dbContext = new NorthwindEntities();("same everywhere only last line


changes")dbContext.Insert();

------------------------------------------------------------------------------------------------------------------------------------------
--------------

Q.52 Read the description & identify which method it belongs to.:-"Initializes a new instance of the
HtmlHelper class by using

the specified view context,view data container,and route collection."

a public.HtmlHelper(IViewContext viewContext,ViewDataContainer viewDataContainer,RouteCollection


routeCollection)
b public.HtmlHelper(ViewContext viewContext,IViewDataContainer viewDataContainer,RouteCollection
routeCollection)-------------------ans

c public.HtmlHelper(ViewContext viewContext,ViewDataContainer viewDataContainer,|RouteCollection


routeCollection)

d public.HtmlHelper(@viewContext,@viewDataContainer,@routeCollection)

------------------------------------------------------------------------------------------------------------------------------------------
--------------

Q.53 What doesa Dependency resolver() do?

a Creates a new dependency

b Creates a new interface

c Initializes a new interface

d Initializes a new instance of the DependencyResolver Class-------------------ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

Q.54 Which ActinResult rediects to another action method?

a All of the listed options.

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

remotely, or obtain references to existiong remote objects.

a ModelBlinder

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

to create attributes and methods for the class?

a EntityConnection

b EntityClientProvider

c EntityConnectionStringBuilder -------------------ans

d EntityContext

------------------------------------------------------------------------------------------------------------------------------------------
--------------

Q.57 Which of these are jQuery Event metods?

a focus()-------------------ans

b mouseenter()-------------------ans

c on()-------------------ans

d hover()-------------------ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

Q.58 Do we have a console option in the Nuget?

a Maybe

b Yes-------------------ans

c no

d None of the listed options

------------------------------------------------------------------------------------------------------------------------------------------
--------------

Q.59 Find the object query methods from the following

a Distinct
b Except

c GroupBy

d All of the listed options-------------------ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

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(t.now);%)

b <%Response.WriteSubstitution(t=>DateTime.Now.ToLongTimeString());%> -------------------ans

c <% var c=dynamic.DateTime()%>

d <%session s= new session["Time"];>

*************************************************************************************
*************************************************************************************
*************************************************************************************
****************

*************************************************************************************
*************************************************************************************
*************************************************************************************
**********************

Leya/Veena/Ajith

1.You need to look up in the database for validation . what kind of validation it is ?

I.remote

II.Self
select one :

a.NOne

b.II only

c.I only----------------------------------ANs

d.Both I and II.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

2.what is the significance of clr enabled option ?

select one or more:

a.It is used to specify whether user assembles can be run by SQL Server

b. The clr enabled option can be set to value FALSE to denote that assembly execution is not allowed on
SQL SErVER

c.The clr enabled option can be set to value TRUE to denote that assembly execution is allowed on SQL
SErVER

d.The clr enabled option can be set to value 0 to denote that assembly execution is not allowed on SQL
SErVER

e.The clr enabled option can be set to value 1 to denote that assembly execution is not allowed on SQL
SErVER
ANS---------------------------a,d,e

------------------------------------------------------------------------------------------------------------------------------------------
--------------

3.Which of the following option is correct to get the blog details details by order it ascending based on
OrderName ?

Select one :

a.from s in ctx.Blogs groupby s.BlogName ascending select s;

b.from s in ctx.Blogs orderby s.BlogName ascending select s;----------------------------ANS

c.from s in ctx.Blogs where s.BlogName ascending select s;

d.None

------------------------------------------------------------------------------------------------------------------------------------------
--------------

5.what does a cache profile do ?

I.Cache profile allows libraries to provide fast output to sqlqueries

II.Cache profile avoids repition in cache attributes.

select one:
a.II only

b.Both I and II only ---------------------------------------ANS

c.None

d.I only

------------------------------------------------------------------------------------------------------------------------------------------
--------------

8.The_________ class provides facilites for querying and working with entity data as objects,keeping
track of the entity objects, along with the state information (added,modified,deleted) and the ability to
update entities and write changes back to the database.

select one:

a.DbContext

b.DataContext

c.ObjectContext-------------------------------------------------------------ANS

d.None

------------------------------------------------------------------------------------------------------------------------------------------
--------------

11.What are the advantages of using EXECUTE AS clause?


Select one or more:

a.The execution becomes faster

b.You can control which user account the databse engine uses to validate permissions on any objects
that are referenced by the module.

c.It provides additional flexibilty and control in managing permissions across the object chain that exsists
between user-defined modules and the objects referenced by those modules.

d.Users of the module only need permissions to execute the module itself;explicit permissions on the
refernced objects are not required.

e.Users of the module need explicit permissions on the referenced objects thereby making it more
secure.

ANS------------------------------b,c,d

------------------------------------------------------------------------------------------------------------------------------------------
--------------

12.Entity Framework 4.1 permits accessing which of the following properties ?

I.Database Value

II.original Value

III.XML Value

select one:
a.I and II only------------------ANS

b.II and III only

C.I and III only

d.I,II and III

------------------------------------------------------------------------------------------------------------------------------------------
--------------

13.Which are the different types of the file groups ?

Select one or more:

a.Secondary

b.Primary--------------------ANS

c.User-defined--------------------ANS

d.Hidden

------------------------------------------------------------------------------------------------------------------------------------------
--------------

14.Consider,you have to update the page asynchronously using Ajax.BeginForm method with Action
"Act" ,Home controller "HO" & the id to update is "up" .
which of the following would you choose ?

Select one:

a. "@using (Ajax.BeginForm("HO" ,"Act",

new AjaxOptions[HttpMethod ="GET" ,

InsertionMode=InsertionMode.Replace,

UpdateTargetid="up"}))"

b. "@using (Ajax.BeginForm("HO" ,"Act",

new AjaxOptions{HttpMethod ="GET" ,

InsertionMode=InsertionMode.Replace,

UpdateTargetid=""}))"

c."@using (Ajax.BeginForm("Act" ,"HO",

new AjaxOptions{HttpMethod ="GET" ,-----------------------------------------------Ans

InsertionMode=InsertionMode.Replace,

UpdateTargetid="up"}))"

d."@using (Ajax.BeginForm("HO" ,"Act",

new AjaxOptions{HttpMethod ="GET" ,

InsertionMode=InsertionMode.Replace,

UpdateTargetid="up"}))"

------------------------------------------------------------------------------------------------------------------------------------------
--------------

15.Which of the following are the data annotations attribute ?


select one or more

a.StringLength------------------------------------ANS

b.Range

c.Compare

d.Required--------------------------------------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

17.Entity framework may support composite keys.

TRue---------------------------------------------ANS

FAlse

------------------------------------------------------------------------------------------------------------------------------------------
--------------

21.which of the following is the Correct options for Database First approach ?

Select one :

a.Generate a database from the Model

b.Generate a Model from the Class


c.Generate a Model from the Database-----------------------------ANS

d.Generate a object from the Model

------------------------------------------------------------------------------------------------------------------------------------------
--------------

24.Which are the different types of Windows -level principals ?

Select one or more:

a.Windows Authorization

b.Windows Domain Login--------------------------------------ANS

c.Windows Database Login

d.Windows local login-----------------------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

25.what does the SELECT statement define ?

select one or more:

a. The format of the database.

b.The format opf the result set.This is specified modify in the select list.

c.The tables that contain the source data.This is specified in the FROM clause.

d.How the tables are logically related for the purpose of the SELECT statement . This is defined in the
join specifications,which may appear in the WHERE clause or in an ON Clause following FROM.
e.The conditions that the rows in the source tables must satisfy to quality for the SELECT
Statement.These are specified in the WHERE and HAVING clauses.

ANS---------------------b,c,d,e

------------------------------------------------------------------------------------------------------------------------------------------
--------------

29.nunit-console exe shows output on console

True---------------------------------ANS

False

------------------------------------------------------------------------------------------------------------------------------------------
--------------

31.How are user-defined functions different from user- defined stored procedures ?

select one or more :

a.IN user- defined function the default parameter is specified wiwth a DEFAULT keyword.

b.In user-defined function omitting the parameter also implies default value

c.User-defined functions do not support output parameters

d.user-defined functions do support output parameters.


ANS---------------------------------------------a,c

------------------------------------------------------------------------------------------------------------------------------------------
--------------

34.How are stored procedure similar to procedures developed in other programming languages ?

select one or more

a.Accept input paramaters and return mulitiple values in the form of output parameters in the calling
procedures or batch

b.Contain prograaming statements that perform operations in the database including calling the other
procedures

c.Return a status value to a calling procedure or batch to indicate success or failure

d.Can be interpreted externally .

ANS------------------------------------a,b,c

------------------------------------------------------------------------------------------------------------------------------------------
--------------

44.Which of the following statement is TRUE to disable lazy loading for all the entities ?

select one :

a.public class BloggingContext:DbContext(public BloggingContext () (this Configuration


LazyLoadingEnabled =true;))
b.public class BloggingContext:DbContext(public BloggingContext () (this Configuration
LazyLoadingEnabled =false;))--------------------------ANS

c.public class BloggingContext:DbContext(public BloggingContext () (this Configuration


EnableLazyLoading =false;))

d.public class BloggingContext:DbContext(public BloggingContext () (this Configuration


EnableLazyLoading =true;))

------------------------------------------------------------------------------------------------------------------------------------------
--------------

45.You have to create a view model which will show a cricket player's name,team name, wickets taken
,runs scored about and his rank.

which of the following should you choose?

select one:

a.Public class PlayerInfoModel { public string.TeamName {get;set} public string.Name {get;set} public
int.wickets {get;set}

public int.Runs{get;set} public int.Rank {get;set} }

b.Public class PlayerInfoModel { public string TeamName() public string Name() public int wickets()

public int Runs() public int.Rank() }

c.Public class PlayerInfoModel { TeamName {get;set} Name {get;set} wickets {get;set}

Runs{get;set} Rank {get;set} }

d.Public class PlayerInfoModel { public string TeamName {get;set} public string Name {get;set} public int
wickets {get;set}
public int Runs{get;set} public int Rank {get;set} }------------------------------------------------------------------------
-----ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

48.We can access data in view using________

select one

a.View@Data

b.View Data

c.ViewData---------------------------------------------------ANS

d.View_Data

------------------------------------------------------------------------------------------------------------------------------------------
--------------

49. Which of the following are the three parts of ENtity Framework ?

I.DOmain Class Object

II.Relational Database

III.Object and Mapping information

select one:
a.I and II

b.I and III

c.II and III

d.I,II, and III.-----------------------------------------------------------------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

50.[ActionName("search")]

public ActionResult GetBySname(string Sname)

//get song name from the database

return View();

-Analyse at the code & choose

Which of the following will invoke the above mentioned method?

Select one:
a.http://localhost/songs/GetBySname/post=lblame?

b.http://localhost/songs/search/blame----------------------------------------------------------ANS

c.http://localhost/songs/GetBySname/blame

d.http://localhost/songs/search/post=lblame?

------------------------------------------------------------------------------------------------------------------------------------------
--------------

53.Which of the following Code will help us to use the table valued functions "GetStudentList" and will
retrieve all the course details of all students from "City1" in Entity Framework ?

select one:

a.using (var ctx = new SchoolDBEntities()) { //Execute TVF and filter result var courseList =
ctx.GetStudentList(1)

Where(c =>c.location =="City1").ToList<GetCourseList>();

foreach (GetStudentList cs in courseList)

COnsole.WriteLine("Course Name:(0), Course Location:(1)", cs.CourseName,cs.Location);)------------------


------------------------------ANS

b.using (var ctx = new SchoolDBEntities()) { //Execute TVF and filter result var courseList =
ctx.GetStudentList(1)

Where(c.location =="City1").ToList<GetCourseList>();

foreach (GetStudentList cs in courseList)

COnsole.WriteLine("Course Name:(0), Course Location:(1)",cs.CourseName,cs.Location);)


c.using (var ctx = new SchoolDBEntities()) { //Execute TVF and filter result var courseList =
ctx.GetStudentList(1)

Where(c => c.location =="City1").ToList<GetCourseList>();

foreach (GetCourseList cs in courseList)

COnsole.WriteLine("Course Name:(0), Course Location:(1)",cs.CourseName,cs.Location);)

d.using (var ctx = new SchoolDBEntities()) { //Execute TVF and filter result var courseList =
ctx.GetStudentList(1)

In(c => c.location =="City1").ToList<GetCourseList>();

foreach (GetCourseList cs in courseList)

COnsole.WriteLine("Course Name:(0), Course Location:(1)",cs.CourseName,cs.Location);)

------------------------------------------------------------------------------------------------------------------------------------------
--------------

54.Entity Framework has in-memory copy of the original values and uses this for working out what has
changed.

True----------------------------------------ANS

False

------------------------------------------------------------------------------------------------------------------------------------------
--------------

55.IClientValidation GetClientValidation

{
var z =new ModelClientValidationRule();

z.ErrorMessage = FormatErrorMessage(metadata.GEtDisplayName());

z.ValidationType ="compare";

z.validationparameters.Add("sample",SamplePropertyName);

yield return z;

----Analyse the code and identity which of the following statement is true ?

select one :

a.None

b.Client side custom validation of custom type="compare"-----------------------------ANS

c.Performs remote validation to compare to compare two properties and shows and error message if
not equal

d.Server side validation for custom property and error message.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

56.To return a string literal , which method is used ?

Select one :

a.Call
b.String---------------------------------------------ANS

c.Literal

d.Content

------------------------------------------------------------------------------------------------------------------------------------------
--------------

57.DbCOntext() method Constructs a new context instance using conventions to create the name of the
database.

True------------------------------------------Ans

False

------------------------------------------------------------------------------------------------------------------------------------------
--------------

keerthi:

1(5)Can you convert a Nonpartitioned Table to Partitioned Table?If yes,how?Choose all that apply.

Select one:

a.By creating a partitioned non-clustered index on the table by using the CREATE INDEX statement

b.By creating a partitioned clustered index on the table by using CREATE INDEX statement-------------------
-------------------ANS

c.By using the ALTER TABLE SWITCH statement to switch the data of the table to a range-partitioned
table has only one

partition--------------------------------------ANS

d.By using the ALTER TABLE SWITCH statement to switch the data of the table to a range-indexed table
that has a unique partition.
e.You cannot convert a Nonpartitioned Table to Partitioned Table.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

2(8)Which of the following is the query product by Categoryname?

Select one:

a.NorthwindEntities dbContext = new NorthwindEntities();var query =from p in dbContext.ProductSet


where p.Categories.CategoryName == "Seafood" select p;IEnumerable<Product>product = query;

b.NorthwindEntities dbContext = new NorthwindEntities();var query =from p in dbContext.ProductSet


where p.Categories.CategoryName == "Seafood" select p;IEnumerable<Product>product =
query.ToList();--------------------------------------ANS

c.NorthwindEntities dbContext = new NorthwindEntities();var query =from p in dbContext.ProductSet


where p.Categories.CategoryName == "Seafood" select p;IEnumerable<Product>product =
query.ToArray();

d.NorthwindEntities dbContext = new NorthwindEntities();var query =from p in dbContext.ProductSet


where p.Categories.CategoryName == "Seafood" select p;IEnumerable<Product>product =
query.ToString();

------------------------------------------------------------------------------------------------------------------------------------------
--------------

3(9)How are the transaction locks acquired by a SELECT statement controlled?

Select one or more:

a.Controlled by the transaction concurrency setting for the connection.

b.Controlled by the transaction isolation level setting for the connection.--------------------------------------


ANS

c.Controlled by any locking hints specified in the WHERE clause.

d.Controlled by any locking hints specified in the FROM clause.--------------------------------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------
4(11) Which of the following code removes a relationship by setting the foreign key to null?

Note,that the foreign key property must be nullable.

Select one:

a.mytable.ForeginKeyColumn = (FK_ID)null;

b.mytable.ForeginKeyColumn =(key)null;

c.mytable.ForeginKeyColumn = null;--------------------------------------ANS

d.None of the listed options.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

5(13)Ashley Is new to developing and the manager has told her to make the form advance by selecting
date.How will Ashley achieve this?

Select one:

a.$(add).datepicker();

b.$(generate).datepicker();

c.$(".create#ProductDate").datepicker();

d.$(".attach#ProductionDate").datepicker();--------------------------------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

6(15)EF supports multiple modeling techinque

State true or false

Select one:

true--------------------------------------ANS

false
------------------------------------------------------------------------------------------------------------------------------------------
--------------

7(17)How to remove dependencies?

Select one:

a.Uninstall-package packageName-RemoveDepencies--------------------------------------ANS

b.All the listed options

c.Remove-Dependencies

d.Delete Depencies

------------------------------------------------------------------------------------------------------------------------------------------
--------------

8(20)IIS stands for______.

Select one:

a.Internet International Standards

b.Internet Information Services--------------------------------------ANS

c.Information of Internet Services

d.ISO's Internet Standards

------------------------------------------------------------------------------------------------------------------------------------------
--------------

9(21)Which of the following are the default parameters are route?

Select one or more:

a.value
b.ID--------------------------------------ANS

c.Model

d.Action--------------------------------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

10(22)What are the benifits of POCO?

I.Maintainace cose associated with code will be less

II.Easily updateable even if the properties in POCO are chnaging

III.Loosely coupled from the Database

Select one:

a.I and II

b.II and III

c.I and III

d.I,II and III--------------------------------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

11(26)What are the different types of debelopment approaches in EF?

Select one:

a.Code First

b.Model First Approach

c.Database first

d.All of the listed options--------------------------------------ANS


------------------------------------------------------------------------------------------------------------------------------------------
--------------

12(29)ObjectContextEF V4.0 and DbContext EF V4.1

State true or false

Select one:

True--------------------------------------ANS

False

------------------------------------------------------------------------------------------------------------------------------------------
--------------

13.(39)AreEqual(Object,Oject)-what does this method do when used with assert?

Select one:

a.Verifies that three specified objects are equal

b.Verifies that two specified objects are equal--------------------------------------ANS

c.All the listed options

d.Verifies that two specified objects are not equal

------------------------------------------------------------------------------------------------------------------------------------------
--------------

14(40)Scott wants to mark an action method to cache the output.Which class will Scott use?

Select one:

a.CacheWithOutput

b.OutputCacheAttribute--------------------------------------ANS

c.Cache
d.O/Pcache

------------------------------------------------------------------------------------------------------------------------------------------
--------------

15(45)In a website you need to use certain caching rule repeatedly.What will be used for you from the
following?

Select one:

a.[OutputCache(CacheProfile="CacheProfile1")]public string Index(){/*some code*/}---------------------------


-----------ANS

b.[OutputCache][CacheProfile="CacheProfile1"]public string Index(){/*some code*/}

c.[OutputCache,CacheProfile="CacheProfile1"]public string Index(){/*some code*/}

d.Copying the code & pasting again.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

16(53)We can create entity Framewoerk without existing database.

State true or False.

Select one:

True--------------------------------------ANS

False

------------------------------------------------------------------------------------------------------------------------------------------
--------------

17(57)In a Entity Framework application, mapping metadata is not loaded from an.msl file

State true or False.


Select one:

True

False--------------------------------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

18(58).What is the expansion of MSL in Entity Framework?

Select one:

a.MApping State Language

b.Mapping Specification Language--------------------------------------ANS

c.Main Specifiaction LAnguauge

d.Maapping System Languauge

------------------------------------------------------------------------------------------------------------------------------------------
--------------

19(51)You are making a login page where you have to take password from user and you have to confirm
the password again.

Which of the following?

Select one:

a.[Database(DataType.Password)][Display(Name="Confirm
password")][ToCompare("Password",ErrorMessage="The entry doesn't match with password
entered.")]public string ConfirmPassword{get;set;}

b.[Database(DataType.Password)][Display(Name="Confirm
password")][@Compare("Password",ErrorMessage="The entry doesn't match with password
entered.")]public string ConfirmPassword{get;set;}
c.[Database(DataType@Password)][Display(Name="Confirm
password")][ToCompare("Password",ErrorMessage="The entry doesn't match with password
entered.")]public string ConfirmPassword{get;set;}

d.[Database(DataType.Password)][Display(Name="Confirm
password")][Compare("Password",ErrorMessage="The entry doesn't match with password
entered.")]public string ConfirmPassword{get;set;}---------------ans

*************************************************************************************
*********************************************************

Vivek:

1(53)Which are the conditions when indexes of views can provide significant performance
adavantages?

Select one or more:

a.When the view contains aggregations-------------------------------------------ANS

b.When the view contains compositions

c.When the view contains table joins-------------------------------------------ANS

d.When the view contains a combination of aggregations & joins-------------------------------------------ANS

e.When the view contains locks

------------------------------------------------------------------------------------------------------------------------------------------
--------------

2(47)EntityClient Api provides the functionalities for connection with database,execute


commands,retrieving query.

State true or false

Select one:

true-------------------------------------------ANS

False
------------------------------------------------------------------------------------------------------------------------------------------
--------------

3(43)Which of the following option is CORRECT to select only the columns StudentName,Department
and GroupName from the student entity of the student name "Kishore"?

Select one:

a.from s in ctx.Students where s.StudentName == "Kishore" select


new{s.StudentName,s.DepartmentName,s.GroupName};------------------------------------------ANS

b.from s in ctx.Students where s.StudentName == "Kishore" where


new{s.StudentName,s.DepartmentName,s.GroupName};

c.from s in ctx.Students where s.StudentName == "Kishore" include


new{s.StudentName,s.DepartmentName,s.GroupName};

d.None of the listed options

------------------------------------------------------------------------------------------------------------------------------------------
--------------

4(42)Which of the following statements are true about Collation?

Select one or more:

a.Collation specifies how strings are stored and compared.------------------------------------------ANS

b.Collation specifies how integers are stored.

c.The selection of collation is Language dependent and addresses differences in the way characters are
ordered.------------------------------------------ANS

d.The default collation for a database is based on the server deafult,which is set during the installation
of SQL Server.------------------------------------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------
5(41)How can we mark a CLR entity type student to avoid mapping in a table in database?

Select one:

a.ModelBuilder.Ignore<Student>()

b.ModelBuilder.Remove<student>();------------------------------------ANS

c.ModelBuilder.Delete<Student>();

d.None of the listed options.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

6(33)Identify the correct syntax :-DropDownListMethod(HtmlHelper, String)

Select one:

a.public static MvcHtmlString DropDownList(this HtmlHelper htmlHelper, string name)

b.public static MvcHtmlString DropDownList(HtmlHelper htmlHelper, string name)

c.public static MvcHtmlString DropDownList(this.HtmlHelper htmlHelper, string name)------------------------


------------------------ANS

d.public static MvcHtmlString DropDownList(this HtmlHelper htmlHelper, istring name)

------------------------------------------------------------------------------------------------------------------------------------------
--------------

7(31)Which is/are a/the console commands ion Nuget from the following?

Select one:

a.Find

b.Get

c.Uninstall
d.All the listed--------------------------------------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

8(27) which of the following data annotation attribute isuseful when you have multiple relationship
between two classes

select one:

a. index

b. foriegn key

c. inverse property----------------------------------ANS

d. complex type

------------------------------------------------------------------------------------------------------------------------------------------
--------------

9(24)what do you mean by eager loading in MVC?

I.related objects(child objects) are located automatically with its parent object

II.related objects(child objects) are not located automatically with its parent object until they are
requested

select one:

a. II only

b. both I and II

c. I only------------------------------------------------ANS

d. none of the listed options

------------------------------------------------------------------------------------------------------------------------------------------
--------------
10(21)if stored procedure returns complex type that is only on conceptual model and not in database
table, what is it called?

select one:

a. scalar

b. complex------------------------------------ans

c. entities

d. none of the listed options

------------------------------------------------------------------------------------------------------------------------------------------
--------------

11in entity framework application storage mode metadata is rendered from .ssdl file

state true or false

select one:

a. true--------------------------ans

b. false

------------------------------------------------------------------------------------------------------------------------------------------
--------------

12(19)Unobtrusive javascript is used to

select one:

a. keep the content accessible when markup is unavailable

b. keep the scripts accessible when markup is unavailable

c. keep the markup and content accessible when javascript is unavailable-------------------------------ANS

d. none of the listed options


------------------------------------------------------------------------------------------------------------------------------------------
--------------

13(20)cache profiles are supported for

select one:

a. standard controller actions but not for child actions------------------------------------ANS

b. standard controller actions but and for child actions

c. standard child actions but not for controller actions

d. standard view and models but not for child actions

------------------------------------------------------------------------------------------------------------------------------------------
--------------

14(24)Which statements are true about table-valued parameters?

select one or more:

a. They are user defined scalar values that are passed into a procedure or function---------------------------
ANS

b. They are user defined table types that are passed into a procedure or function

c. They provide an efficient way to pass multiple rows of data to the server----------------------------ANS

d. they provide an efficient way to pass a connection to the server-------------------------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

15(6) ________________ occurs when you need to point to another data object from one data object.

select one:

a. int data type


b. string data type

c. float data type

d. complex data type--------------------------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

16(14)what will be the output of the following query ?

USE SalesSystem;

Go

SELECT PATINDEX('%ia',Country)

FROM Production.Customer

GO

select one or more:

a. the query returns those rows in the table in which the pattern was found.

b. the query returns all the columns for those rows in the table in which the pattern was found.

c. the query returns only those columns in each rows in the table in which the pattern was found.

d. the query returns all rows in the table and reports nonzero values for those rows in the table in which
the pattern was found.----------------------------------------ANS

e. the query returns all rows in the table and reports zero values for all rows in the table in which the
pattern was found.--------------------------------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

17(4)Rashmi has created an application using .net framework 3.5 but IISApp pool shows only version 2.0
for hosting. which of the

following should she choose?

select one:
a. it requires a refresh

b. install version 3.5 and change IIS App pool version to 3.5 ------------------------------ANS

c. Version 3.5 is not installed in IIS App pool

d. None of the listed options

*************************************************************************************
*************************************************************************************
***

PRATEEK-MUMBAI

1.TDD code should be

I.readable

II.Maintainable

select one or more:

a. Both I and II----------------------ans

b. II only

c. none

d. I only

------------------------------------------------------------------------------------------------------------------------------------------
--------------

2.which attribute is used to set complex type in entity framework annotations

select one:

a. ComplexType--------------------ans

b. MaxLength

c. Key

d. ComplextypeColumn
------------------------------------------------------------------------------------------------------------------------------------------
--------------

3.what happens if the SCHEMABINDING option is used in CREATE FUNCTION statement

select one or more:

a. the user-defined function cannot be deleted unless the database is dropped

b. the user-defined function cannot be modified unless the database is dropped

c. the database objects that the function references cannot be altered or dropped unless the function is
dropped first-----------ans

d. the database objects that the function references cannot be altered or dropped unless the schema
binding of the

function is removed------------ans

Note:If a function is created with the SCHEMABINDING option,

then the database objects that the function references cannot be altered or dropped unless the function
is dropped first,

or the function is altered and the SCHEMABINDING option is not specified.

------------------------------------------------------------------------------------------------------------------------------------------
--------------

4.which of the following T-SQL statement are not allowed in DML trigger

select one or more:

a. ALTER DATABASE-------------ans

b. LOAD DATABASE-----------ans

c. CREATE

d. UPDATE

e. CREATE DATABASE------------ans
------------------------------------------------------------------------------------------------------------------------------------------
--------------

5.you want to prevent your feedback from XSS. which of the following is valid option to do it ?

select one:

a. feedback .Body=Sanitizer.GetSafeHtmlFragment(feedback@Body);

b. feedback .Body=Sanitizer.GetSafeHtml(feedback.Body);

c. feedback .Body=Sanitizer@GetSafeHtmlFragment(feedback.Body);

d. feedback .Body=Sanitizer.GetSafeHtmlFragment(feedback.Body);---------------ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

6.in TDD, we develop the code first which is then followed by testing

state true or false

select one:

a. true

b. false------ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

7. we set IsSynchronizedWithCurrentItem property of the objects list box to true. that way every time
you change

the selection in the listbox the current item in the colectionviewsource is updated.

state true or false


select one:

a. true----------------ans

b. false

------------------------------------------------------------------------------------------------------------------------------------------
--------------

8.what are the isolation semantics for FILESTREAM storage ?

select one or more:

a. the isolation semantics are governed by database engine transaction isolation levels----------------ans

b. when the FILESTREAM data is accessed through the win32 APIs,read-committed,repeatable-read and
serializable

isolation levels are supported

c. when the FILESTREAM data is accessed through the win32 APIs,only read-committed level is
supported---------ans

d. when the FILESTREAM data is accessed through Transact-SQL,only read-committed level is supported

e. when the FILESTREAM data is accessed through Transact-SQL,read-committed,repeatable-read and


serializable

isolation levels are supported---------------ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

9. IOC stands for inversion of constraint

state true or false


select one:

a. true

b. false---------ans(Inversion of Control)

------------------------------------------------------------------------------------------------------------------------------------------
--------------

10.marry jane is creating a page for songs feedback. the mapping should be done in such way that one
song can have more

than one feedback as many as users will be providing the feedback. which of the following option will
help her accomplish

her task ?

select one:

a. ModelBuilder.Entity<Song>()

.HasMany(song=>song.feedbacks)

.WithRequired(feedback=>feedback.Song);---------------ans

b. ModelBuilder.Entity<Song>()

.HasMany(song=>song@feedbacks)

.WithRequired(feedback=>feedback@Song);

c. ModelBuilder.Entity<Songs>()

.HasMany(song=>song.feedbacks)

.WithRequired(feedback=>feedback.Song);

d. ModelBuilder.Entity<Song>()

.ManyHas(song=>song.feedbacks)

.WithRequired(feedback=>feedback.Song);
------------------------------------------------------------------------------------------------------------------------------------------
--------------

11.which of the following restrictions is true about action method in controller ?

select one:

a. Method can be private

b. Method can be overloaded

c. Method can be proctected

d. Method can't be static----------ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

12.which of the following do an entity data model render a model ?

select one:

a. ClassDiagram

b. Graphically------ans

c. Model Diagram

d. None of the listed options

------------------------------------------------------------------------------------------------------------------------------------------
--------------

13.identify the steps in handling errors in a stored procedure

select one or more:

a. when an error condition is detected in a T-SQL statement that is inside a TRy bloc, control is
immediately passed to the CATCH block------------------ans

b. the error is processed in the TRY block

c. the error is processed in the CATCH block----------------ans

d. T-SQL statements in the TRY block that follow the statement that generated the error are not
executed-------------ans

------------------------------------------------------------------------------------------------------------------------------------------
--------------

14. Choose Maria to add a JQuery refrence in file

ans:<Script src="../Scripts/jquery.validate.min.js" type="text/javascript"></Script>

------------------------------------------------------------------------------------------------------------------------------------------
--------------

15.Identify NonDeterministic functions from the following

Select one or more:

a.Month

b.GetDate-----ans

c.Day

d.GetUtcDate---ans

e.Current_Timestamp----ans

Deterministic functions always return the same result any time they are called with a specific set of
input values and given the same state of the database. Nondeterministic functions may return different
results each time they are called with a specific set of input values even if the database state that they
access remains the same.
------------------------------------------------------------------------------------------------------------------------------------------
--------------

16. The ADO.NET ______________ control supports data binding scenarios in Web Applications that use
the ADO.NET Entity Framework.

ans::EntityDataSource

------------------------------------------------------------------------------------------------------------------------------------------
--------------

17. Yu are handling a site of products and the users are complaining

about the wish list error. Common opinion is once yu add the item in the wish list after refreshing the
duplivate,values are shown as +an error from the browser+always message shows which item is added
instead of message when yu have recently added.

Which option would yu choose?

ans: public ActionResult Index()

ViewData["selection"]=Session["selection"];

/*rest of code*/}

------------------------------------------------------------------------------------------------------------------------------------------
--------------

18. Choose a query to show all the players with name Rocky and show it according to teamname.

ans:

var z=from q in db.players

where q.players.name=="Rocky"

orderby q.TeamName

select q;

*************************************************************************************
*********************************************
jasbir-2

2. In which of the following the entities and relationship are created on EDMX design surface?

select one:

a.Code First Apporoach

b.Model First Apporoach---------------------------------------ANS

c.Database Apporoach

d.none

------------------------------------------------------------------------------------------------------------------------------------------
--------------

4.which of the following code removes a relationship by setting the foreign key to null?

select one:

a.mytable foreignkeycolumn=(FK_ID)null;

b.mytable foreignkeycolumn=(key)null;

c.mytable foreignkeycolumn=null;--------------------------------ANS

d.none of listed

------------------------------------------------------------------------------------------------------------------------------------------
--------------

7.which is/are a/the console commands in nuget from the following?

select one:

a.all the listed----------------------------ANS

b.Find

c.Uninstall

d.Get
------------------------------------------------------------------------------------------------------------------------------------------
--------------

12.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

d) the default is partial which provides the greatest level of recovery

------------------------------------------------------------------------------------------------------------------------------------------
--------------

17.output caching lets you store the output of a/an----------- method in the memory on the web server

select one:

a.view and memory

b.process & memory

c.Action & memory---------------------ANS

d.Controller & memory

------------------------------------------------------------------------------------------------------------------------------------------
--------------

20.Entity state property is enum type

a.true---------------------ANS

b.false

------------------------------------------------------------------------------------------------------------------------------------------
--------------
21. Entity SQL allows querying those entites and relationship in a format that is familiar to those who
have used SQL

a.true---------------------------ANS

b.false

------------------------------------------------------------------------------------------------------------------------------------------
--------------

22.What does the Query execution plan defines?

select one or more:

a.the sequence in which the source tables are accessed------------------------------ANS

b.the sequence in which rows are accessed

c.the methods used to extract data from each table-----------------------------------ANS

d.the methods used to arrange data in each table

------------------------------------------------------------------------------------------------------------------------------------------
--------------

23.We can pass information from a controller to a view using ViewBag.

State true or False:

Select one:

True-------------------------------------------------------ANS

False

------------------------------------------------------------------------------------------------------------------------------------------
--------------

24.The entity framework uses mapping metadata to translate queries against the conceptual model
storing specific commands.
state true or false

a.true------------------------------ANS

b.false

------------------------------------------------------------------------------------------------------------------------------------------
--------------

27.What will happen if you specify "name=MyDb" parameter in the base constructor of a context class?

select one:

a.code first will create database named MyDb in the local SQL server----------------------ANS

b.code first will create database with the same name as context class name.

c.code first will create database named "name=MyDb" in the local SQL server

d.Code first will use connection string named MyDb defined in the config file to craete the database

------------------------------------------------------------------------------------------------------------------------------------------
--------------

29.which class is used to execute an entity SQL command against an entity mode?

select one:

a.EntityCommand---------------------------ANS

b.EntityConnection

c.SqlCommand

d.None

------------------------------------------------------------------------------------------------------------------------------------------
--------------

30.which of the following method of the ObjectStateManager is used to get object state entry?

a.TryGetObjectStateEntry----------------------------------ANS

b.ChangeObjectState
c.GetRelationshipManager

d.ChangeRelationshipState

------------------------------------------------------------------------------------------------------------------------------------------
--------------

32.In "return json()" denyGet is default to avoid

a.trafficking

b.password copying

c.slow loading

d.json hijacking-----------------------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

33.In Razor,we can write code and markup in single file and still get desired output

select one:

a.maybe

b.none of the listed

c.no

d.yes-------------------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

34. which of the following class provides you important methods to configure entities and its properties
to override various code first conventions?

select one:
a.EntityCOntext

b.EntityTypeCOnfiguration------------------------ANS

c.DBContext

d.ObjectContext

------------------------------------------------------------------------------------------------------------------------------------------
--------------

35.

which of the following advantage does strongly typed view have?

a.Run Time

b.intellisense--------------------------ANS

c.faster buffering

d.loading

------------------------------------------------------------------------------------------------------------------------------------------
--------------

36.Which attribute is used to set minimum length for column?

a.minlength------------------------------ANS

b.Maxlength

c.minimum length

d.length

------------------------------------------------------------------------------------------------------------------------------------------
--------------

37.what do u mean by Lazy loading in MVC?

I.related objects are loade automatically with its parent objects

II.related objects are not loaded automatically with its parent object until they are requested
Select One:

a.I only

b.II only------------------------------ANS

c.Both I and II

d.None of the above

------------------------------------------------------------------------------------------------------------------------------------------
--------------

38.Which of the following is TRUE about entity set

select one:

a.An entity is a logical container for instances of an entity type and instances of any type derived from
that type

b.An entity set is defined within an entity container which is logical grouping of entity sets and
association

c.the type of the instance is either same as entity type on which the entity set is based or type of
instanceis subtype of entity type

d.all above listed------------------------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

43.myDBContext Entity(staffentity).References(s=>s.subjects).load()indicates which of the following

select one:

a.lazy loading

b.explicit loading---------------------------ANS

c.database loading

d.object loading
------------------------------------------------------------------------------------------------------------------------------------------
--------------

44.we can insert data into your databse tables during databse initialization process

a.true-------------------------ANS

b.false

------------------------------------------------------------------------------------------------------------------------------------------
--------------

45. which of the following add-in is helpful in TDD?

I. coderush express

II. Test Express

a. None

b. II only

c. I only-------------------------ANS

d. Both I and II

------------------------------------------------------------------------------------------------------------------------------------------
--------------

51.how are database-level principals are categorized

select one or more:

a.database administrator

b.datatbase user-----------------------------ANS

c.database role---------------------ANS

d.windows role

e.application role------------------------------ANS
------------------------------------------------------------------------------------------------------------------------------------------
--------------

52.which method is used to get the entity based on composite keys in entity framework?

select one:

a.load

b.find-----------------------ANS

c.include

d.take

------------------------------------------------------------------------------------------------------------------------------------------
--------------

53.SQL server consist of which of the following three types?

select one or more:

a.primary data files-------------------------------ANS

b.secondary data files-----------------------ANS

c.hidden files.

4.Log files----------------------------ANS

------------------------------------------------------------------------------------------------------------------------------------------
--------------

55.which of these are jquery event methods?

select one or more:

a.On()-----------------------ANS

b.hover()--------------ANS

c.mouseenter()------------------ANS

d.focus()------------------ANS
------------------------------------------------------------------------------------------------------------------------------------------
--------------

59.which command show list of command?

select one:

a.update

b.Get----------------------------ANS

c.Find

d.Help

------------------------------------------
------------------------------------------
------------------------------------------
--------------------------
6) true or false

7) a,b & d
59) a and b

60) a, b and d
58) d
56) b c d

57) c
54) a…….. I and II

55)a b d
51) model defined functions

52) a abd b
49) inverse property

50) output chache attribute


47 ) c
43) a c d
42) a b d
40) a c e
37) true

38) c
35 ) a

36) using(Html.BeginForm("index","Product"))

Html.DropDownList("Range",new selectList(viewBag.Ranges))

<input type="submit" value="filter"/>

}
34) b
31) a b d e

32) b
27) c d

28) b
26 ) a

24) b
22) c
20.types of indexes-------->clustered,unique,nonclustered,Index with included columns
14) a and b
11) b

12) I only
1.

2.

3.

4.

5.

6.jQuery.Vaidator.addmethod----------->a.True or False

7.CLR-table vaued functions----------->

10

11.VaryByHeader---------->b.

12.String idea="A"-------------------->I only

13

14.Create trigger---------------------->a & b

15.DropDownList Method Syntax---------->b

16

17

18

19."kishore"-------------->a

20.types of indexes-------->clustered,unique,nonclustered,Index with included columns

21

22.don't eave the spae blank----------->c

23

24.web.config-------->b

25.naviation poperties------>d

26.route registration-------->a

27.EXTERNA_ACCESS permission------------>c,d

28.views are used to conro pacement of------------->b

29
30

31.consideration of clusered indexes----------------->a,b,d,e

32.Felicia is a new deveoper------------>b

33.which method in DBContext-------------->b

34.relationship between two entity types-------------->b

35.Azure Table storage--------------------->a

36.[... ------------------------------------------------------------------ANS

@using(Html.BeginForm("index","Product"))

Html.DropDownList("Range",new selectList(viewBag.Ranges))

<input type="submit" value="filter"/>

...]

37.scalar location property points----------->true

38.peter is a web developer----------->c

39.reove an enity from db det--------->b

40.steps for creating partition tables-------->a,c,e

41.maeriazation in entity framework------------>b

42.primary XML index----------->a,b,d

43.paraeters to user-defined functions---------->a,c,d

44.SSDL stands for------------->c

45. scrrenshot ila ma

46.Nuget download------------->a

47.deete the database on the database server if it exist------->c

48.

49.multiple relaionship between two classes---------->c


50.scott wants o mark an action method--------------->b

51.define CSDL------------->model-defined function

52.pe of entiy--------->Dynamic Proxy (POCO Proxy),POCO Entity

53.order of TDD steps----------->write unit test, write enough,run the test,watch

54.database initiaiser----------->database creation and initialization

55.partition table managed--------->a,b,d

The data of partitioned tables and indexes is divided into units that can be spread across more than
one filegroup in a database.

The data is partitioned horizontally, so that groups of rows are mapped into individual partitions.

The table or index is treated as a single logical entity when queries or updates are performed on the
data.

56.aggregate-function work-------------->b,c,d

57.between web browser and a web server------------>c

58.IObjetContextAdapter---------->d

59.Dese_Rank function------------>a,b

60.CLR-stored procedures--------->a,b,d

You might also like