Showing posts with label Interview-MVC. Show all posts
Showing posts with label Interview-MVC. Show all posts

Wednesday, June 16, 2021

Agriya

1. Can we use 'this' keyword inside static class?

2. What is Request Filter in Web api?

3. What is JWT token and how to validate it?

4. What is OWIN?

5. What is OAuth and how it is working?

6. What is Anchor property in Win Form?

7.  How to send values from one Form to another?

8. What  is Redux and how to use it?

9. Difference between static and Singleton?

10. Can we execute stored procedure inside function?

11. Which is multicast Observable?

 Ans Subject

12. Difference between Abstract and Interface. Which will you take when?

13. What is Request filter in Web API?

14. What is Filter Index?

15. What is execution plan in SQL Server?


Thursday, June 10, 2021

TIU Consulting

 1. What is Anomalies in Database?

 2. What is ACID rule?

 3. What is the use of Redux and other terms in Redux?

 4. What is Authgaurd in angular?

 5. What is difference between ViewData, ViewBag and   TempData?

 6. What is alternate in .Net core for these three?

 7. What is the use of SQL Profiler?


Ubique IInd Round

1. What is the use of Action, Reducer and Selector in Redux?

2.  What is the use of spread operator?

3. What is materlized view in SQL server?

4. What is execution plan in SQL Server?

5. What should we use in java script to store value in key-value pair, key should be uniquely store?

6. Difference between Abstract and Interface.

7. What is de structuring in java script?

8. What is Authgaurd in angular?

9. What is the use of Provider in angular?

10. What is JWT?

11. Is JWT it secure?

12. Is there a way to make it (JWT) secure ?

13. Explain Post, Put, Get, Patch and Delete verb in Web API?

14. What is Tuple in C#?

15. Difference between class and struct.

16. What is Lambda expression in C#?

17. When the IQueryable query executed?

18. What need to execute it immediately?

19. What is the use of DBContext class?





Tuesday, June 8, 2021

Ubique

 1. Difference between virtual and abstract.

 2. What is entity model in .Net

3. What is Null Collasce operator in C#?

4. What is null condition check?

5.  How to optimize a sql query?

6. What is auth gaurd in Angular?

7. What is Identity4 and how to implement it?

8. How to authenticate Web api?

9. What is async pipe?

10. What is directive in angular?

11. How to achieve dependency injection in .Net core?

12. What is the use of startup class?

13. What is scoped, transient and singleton dependency in .Net?

14. What are the feature of C# 8.0?

15. What is entity data model in entity framework?

16.  What is claim and claimscope in Web API?

17. How will implement paging in entity frame work?


 

Friday, June 4, 2021

Wipro

1. Difference between Rest API and Restful API?

2.  How to insert a csv file  data in a table?

3. How to call Web API end point from MVC?

4. What are security available in Web API?

5. 

Tuesday, June 1, 2021

Unthinkable

1. What is CDC in microservices? 
3. What is Reactive Extension in microservices? 
4. Write query for pagination in sql. 
5. How can we pass table in Stored Procedure? 
6. What is the limitaion of CTC? 
7. What is drawback of View in SQL? 
8. What is Life cycle hook? 
9. What is difference between MVC and Webform? 
10. How do you estimate stories? 
11. What is the difference between defferred and immediate execution? 
12. What is Remote Attribute? 
13. How you will you implement dulication email in the uer registration in MVC? 
14. How to return common result from WebAPI? 
15. What is Mocking how to use that? 
16. How to find memory leak in .Net? Ans : using Event Analyser 16 How to debug .net application?
17. What is Merge into?
18. How to parse json in sql server?
19. Where we use temporary table?
20. What is the difference between Authentication Filter and Authorization filter?
21. Difference between VM and Docker
22. How to generate token in Web API?
23. What is the meaning of 204 and 209 in Web API?

Saturday, November 30, 2019

Interview

1. What is Cross Apply in SQL Server?
2. How to test Singleton class?

[TestMethod()]
public void ReturnConnTest()
{
    SClass target = new SClass(); 
    string expected = "This is MOQ class"; 
    string actual;
    Mock<SClass> moqClass = new Mock<SClass>();
    moqClass.Setup(mc => mc.ReturnConn()).Returns(expected);
    target = moqClass.Object;
    actual = target.ReturnConn();
    Assert.AreEqual(expected, actual);
}
3. Difference between Dependency Injection and Inversion of control.

Here is an informal definition of IoC: “IoC is when you have someone else create objects for you.” So instead of writing “new MyObject” in your code, the object is created by someone else. This ‘someone else’ is normally referred to as an IoC container.

This simple explanation illustrates some very important ideas:

  1. It is called IoC because control of the object is inverted. It is not the programmer, but someone else who controls the object.
  2. IoC is relative in the sense that it only applies to some objects of the application. So there may be IoC for some objects, whereas others are under the direct control of the programmer.
DI is one of the subtypes of the IOC principle  

We can achieve Inversion of Control through various mechanisms such as: Strategy design pattern, Service Locator pattern, Factory pattern, and Dependency Injection (DI).

Inversion of Control(IoC) is a principle by which the control of objects is transferred to a container or framework. Dependency injection is a pattern through which IoC is implemented and the act of connecting objects with other objects or injecting objects into objects is done by container rather than by the object themselves.




Tuesday, May 21, 2019

Interview MVC

Limitations of TPL in comparision of Thread


Advantages: Declaritive way to write concurrent processes w/o having to deal with the lower level concurrency contructs Easily convert existing sequential code to concurrent code by simply converting to parallel loops and plinq The PFX framework makes it very easy to scale your app to more powerfull hardware without you having to change any code. (the system will automatically create a thread per core) Lowers the risk of screwing your code up with a small concurrency errors Limitations: PFX will run your code in parallel even if the work load is very small. This will usually cause the program to run slower than a regular loop or query would. You do not have full control over the concurrency of your code when using plinq or the static Parallel class (I think this is good, it relates to what I wrote above about not screwing your code up) Its pre-release, it may have bogs and it may be refactored before its released PFX only works with .Net 3.5, you can't use it on shared hosting that hasn't upgraded yet Soruce

What is template pattern?
What need to do so that a class load as soon as program load, without accessing it.
Ans : Make it static
If you are implementing Liskov susbtitution and you have not parnent class with you, than how will you do that.

Thursday, February 21, 2019

Interview

What is tuple size?
Ans Tuple size 8.

If we have lakhs of records  in database and we are inserting and selecting at same time. 
Can we do that how?
Types of user defined function?
Difference between var and dynamic.
Difference between abstract and interface.
Why we need interface?

Can we use asynch and await separately?
Ans No

What is the use of cursor?
Write a lambda query and Sql query to fetch data from a list/table


Give me some pattern name of structural?
Observer pattern
Composite pattern?
Difference between factory and Abstract factory.
The main difference between a “factory method” and an “abstract factory” is that the factory method is a single method, and an abstract factory is an object.
The factory method is just a method, it can be overridden in a subclass, whereas the abstract factory is an object that has multiple factory methods on it.
The Factory Method pattern uses inheritance and relies on a subclass to handle the desired object instantiation.
What is return type of procedure?
Integer
Can we return any value from procedure?
In SQL Server by using the return values, we can return only one integer. It is not possible, to return more than one value using return values, whereas in output parameters, we can return any data type and a stored procedure can have more than one output parameter.
How to return value from function?
What is the use of view?
Can we update table from view?

Thursday, January 3, 2019

Saturday, December 29, 2018

Interview

1. How to validate xml in c#?
Ans : Create an xml schema and use XmlValidator class.

2.Can we overload constructor in typescript?
Ans TypeScript allows you to declare overloads but you can only have one implementation and that implementation must have a signature that is compatible with all overloads. 

3. How to generate com component in .Net?
Ans: check the check box make com visible.

4. How to pass data from view to controller in MVC?
Ans

5. How to bind one view model with two view and update only one view base on condition.
Ans :

Tuesday, December 4, 2018

Interview

Angular

1. What is View Encapsulation?
Ans https://interview-preparation-for-you.blogspot.com/2018/06/encapsulation-in-angular.html

2. What is new in Angular 6?
Ans: https://interview-preparation-for-you.blogspot.com/2018/12/what-is-new-in-angular-6.html

3. What are basic building block in angular 2?
Ans : https://interview-preparation-for-you.blogspot.com/2018/12/what-are-basic-building-blocks-of.html

4. Difference between Promise and Observable.
Ans : https://interview-preparation-for-you.blogspot.com/2018/02/difference-between-promise-and.html

5. Difference between directive and Component?
Ans : https://interview-preparation-for-you.blogspot.com/2018/02/difference-between-component-and.html

6. Life cycle of Angular component?
Ans : https://interview-preparation-for-you.blogspot.com/2018/02/lifecycle-hook-of-component.html

7. What ngModel do?
Ans : ngModel is a directive that is used for two way data binding.
https://interview-preparation-for-you.blogspot.com/2018/02/two-way-data-binding.html

8. Difference between ngStyle and ngClass
Ans : https://interview-preparation-for-you.blogspot.com/2018/12/difference-between-ngstyle-and-ngclass.html
9. What are pipes?
Ans : https://interview-preparation-for-you.blogspot.com/2018/01/pipes-in-angular-2.html

10. What is the use of package.json
Ans : https://interview-preparation-for-you.blogspot.com/2018/12/what-is-use-of-packagejson.html

MVC
1. What is the role BundleConfig?
Ans : https://interview-preparation-for-you.blogspot.com/2018/12/what-is-role-of-bundleconfigcs-in-mvc.html

2. What is MVC life cycle?
Ans : https://interview-preparation-for-you.blogspot.com/2018/04/mvc-application-life-cycle.html

3. Difference between ViewBag and ViewData?
Ans : https://interview-preparation-for-you.blogspot.com/2017/11/difference-between-view-dataviewbag-and.html

4. What is TempData?
Ans : https://interview-preparation-for-you.blogspot.com/2017/11/difference-between-view-dataviewbag-and.html
5. Difference between architecture and design pattern
Ans: Architecture are like 3-tier architecture,2 tier architecture. Design pattern includes How to create object, hto make structure and how object communicate.

6. Difference between ASP .Net and ASP .Net Core
Ans :  ASP .Net core is platform independent and removed the dependency from GAC.

Entityframework
1. Difference between Entity framework and ADO .Net
Ans : https://interview-preparation-for-you.blogspot.com/2018/12/difference-between-entity-framework-and_31.html

2. Difference between Entity framework and LINQ
Ans : https://interview-preparation-for-you.blogspot.com/2018/12/difference-between-entity-framework-and.html

3. What are the building block on entity framework?

WebAPI
1. Difference between WebAPI and WCF
2. Can we return View from Web API?
Ans : No

3. Security in WebAPI
And : use token

4. What to do to prevent an Action method to called from outside?
Ans : use NonAction attribute or ChildOnlyAction

Thursday, November 15, 2018

Interview

1. What are types of Caching?
Ans There are two type of caching.
Data Caching and Fragment Caching.

2. Difference between angular and MVC?
3.What is Jenkins?
4. What is Urlen(Hosting)?
5. How to use two model in single View ?
Ans using Expando object.

6. What is Partial View? What is the use of it?
7. Explain S of SOLID in terms of SQL.
8. Difference between WCF and Web API?
9. Can we define abstract class as Sealed?
Ans No.

10. Difference between implement interface and inheritance?
Ans:  Implementation of interface is implement a class with interface and in that case this is compulsory to define the all methods of interface, While in case of inheritance of interface, we inherit an interface with another. In that case you can't define methods in interface, the class that will implement that interface will have to implement both interface methods.

11. What is Boxing UnBoxig, Where do you have use it?
12. What is Routing?
13. What is attribute routing?
14. Dependency Injection in MVC?
15. What are the type of Dependency Injection ?
Ans There are four type one Singleton, second is Scope

16. Will dependency Injection improve testing?
Ans yes improve

17. What is Scafolding and what is the benefit of Scafolding?
Ans : https://www.csharpstar.com/what-is-scaffolding-in-asp-net-mvc-and-advantages-of-using-it/

18. What is Elastic Search?
19. Can we overload main method? Why we need to overload main method?
20. What are the properties of Data Adoptor?
Ans There are four properties of Data Adoptor.
Update,Delete, Insert,Select





Friday, September 28, 2018

R System

1. What is architechture of your application - 3-tier , n tier or what?
2. What are challenges.
3. Which principle u use while design ing the application.
4. Whas is solid explain every term?
5. Why do we need dependency injection?
6. In which sitaution u use web api or wcf.
7. How will you unit test protected method?
Ans: Derive the Test with the class that you want to test.

Friday, September 7, 2018

NIIT & Mobility

NIIT
1. How to compile the multiple typescript into single javascript
2. what is ViewChild
3. How to post the method from view in MVC
4. How to call the action method from view in mvc
5. How to send the data from controller to view in mvc
6. How to give the alias name for action method in mvc
7. Binding in WCF / Web API
8. How to do binding in Rest API's(basically asked for wcf rest api's)
9. How to handle the Exception in WCF
10. What are filters in MVC
11. How to make the service from command in Angular
12. How to do multiple submit from MVC View
13. How to send the data from component to component in Angular
14. How to make service in angular

15. If database goes down then what will you do for the user. means should he wait or whatelse
Ans Use Master Slave

16. How to handle the errors in client side.
17. Unit test case for angular
18. Lazy loading in angular
19. Bundling and minification in MVC

MobyLite
1. What is NodeJS and why it is used
2. How to Achieve the multithreading in NodeJS(Clustering)
3. What is different between module.export and export
4. what is middleware in nodeJs
5. Express framework
6. What is the command for Linux in nodeJs
7. What are the commands for GitHub
8. What is observable
9. What is difference between observable and promise
10. Sharding in mongoDb
11. How to achive Joins in MongoDB
12. How to sort the "Noor Alam" Alphabatically
13. How to swap the two variable withoit using the third variable.
14. What version you are using nodeJs( V5.1.0)


15. What is upsert in mongodb

Monday, September 3, 2018

InfoVisionLabs

1. We have task and we have four types of task which design pattern used to create a task.
2.What is explicitly implementation of interface.
3. Difference between multi threading and async  await.
4. What are Filter in MVC?
Ans : https://interview-preparation-for-you.blogspot.com/2018/01/filters-in-mvc.html 5. How will you handle run time exception?
6. Difference between let and var
7. Communication between child and parent, parent to child
8. When ngOnChange called?
9. SOLID princile
10. Factory and Abstract Factory pattern
11. How to inherit in typescript?
12.What is ViewContainerRef.
If you ever needed to insert new component or template programmatically, you probably used the ViewContainerRef service. https://netbasal.com/angular-2-understanding-viewcontainerref-acc183f3b682
https://indepth.dev/posts/1052/exploring-angular-dom-manipulation-techniques-using-viewcontainerref

13. What is Union & Intersection in typescript
14. How to make a service accesbile only for some component?
Ans : Register the service inside component provider property of the @Component() metadata. When you register a provider at the component level, you get a new instance of the service with each new instance of that component.
src/app/hero-list.component.ts (component providers)
content_copy
@Component({
  selector:    'app-hero-list',
  templateUrl: './hero-list.component.html',
  providers:  [ HeroService ]
})
15 What is Node in angular?
16 What Node does in angular in development environment to run application.

Tuesday, July 24, 2018

ISHIR

1.How will you check number of users currently accessing your website?
2.How will you prevent DDOS attack?
Ans : A distributed denial-of-service (DDoS) attack is a malicious attempt to disrupt the normal traffic of a targeted server, service or network by overwhelming the target or its surrounding infrastructure with a flood of Internet traffic. DDoS attacks achieve effectiveness by utilizing multiple compromised computer systems as sources of attack traffic. Exploited machines can include computers and other networked resources such as IoT devices. From a high level, a DDoS attack is like an unexpected traffic jam clogging up the highway, preventing regular traffic from arriving at its destination.
Ans : https://www.guru99.com/indexing-in-database.html
https://www.cloudflare.com/en-in/learning/ddos/what-is-a-ddos-attack/
3.What is the return type of Result Filter?
Ans : Return type is void. There are two methods public void OnResultExecuted(ResultExecutedContext filterContext) public void OnResultExecuting(ResultExecutingContext filterContext)
4.How many types of filter in MVC5?
Ans : Four types.
https://interview-preparation-for-you.blogspot.com/search?q=Filter
5.What is benefit of attribute routing?
Ans : Helps developer in the debugging / troubleshooting mode by providing information about routes.
Reduces the chances for errors, if a route is modified incorrectly in RouteConfig.cs then it may affect the entire application's routing.
May decouple controller and action names from route entirely.
Easy to map two routes pointing to the same action.
https://interview-preparation-for-you.blogspot.com/2018/01/attribute-based-routing.html
6.What is WCF security?
Ans : https://interview-preparation-for-you.blogspot.com/2017/05/wcf-interview-questions.html
7.When will you use SOAP and when rest?
Ans : https://interview-preparation-for-you.blogspot.com/2018/11/difference-between-wcf-and-web-api.html
8.Store procedure optimization technique?
Ans : https://interview-preparation-for-you.blogspot.com/2021/05/procedure-optimization-technique.html
9.What is difference between CTE and temp variable?
Ans : https://interview-preparation-for-you.blogspot.com/2018/04/cte-vs-temp-table.html
10.There is a query we have used 20-30 joins? Is it good to write so many joins?
Ans : No
11.We have two columns first name and last name. One indexing is applied on first name. and we have a quyery to searching last name
So do we get the benefit of indexing?
Ans : No
12.What is primary index and secondary index in a table?
The secondary Index in DBMS can be generated by a field which has a unique value for each record, and it should be a candidate key. It is also known as a non-clustering index. This two-level database indexing technique is used to reduce the mapping size of the first level. For the first level, a large range of numbers is selected because of this; the mapping size always remains small.
Ans : https://www.guru99.com/indexing-in-database.html
13.How will we check execution time of store procedure?
Ans Using SQL Optimizer
14.In a controller we have dependency injection so how will you call controller method without using IOC container.
15.What is elastic IP in AWS?
16.Can we use mongodb in RDS in AWS
17.Can we have contructor in static class.
Ans : No, It can have only static constructor. 18.When we have object in gen 2 in GC
19.How will you implement finalize and why?
Ans: Destructor method is converted in finalize method,
If there are some unmanaged code used in application than we use Finalize to free the memory.If no unmanaged code used than no need to use Finalize method
20.difference between ref and out
21.what is IEnumerable and IEnumerator
22.var vs dynamic?
23.Real example of Interface and Abstract Class.
24.Router in Angular.
25.life cycle hook in angular?
26.lazy loading in angular?
27.Component communication in angular
28.Benifit of private constructor?

Tuesday, April 17, 2018

IRIS

1. Why you have chosen angular?
2. What is advantage and disadvantage of aot?
3. How will you set development environment for a project?
4. How will you implemeny kerberos authentication in windows?
5. What is security threat and other threat in angular?
6. What difference between Controllar and APIController?
7. If you have a list in model we want to display using @Http.TextFor than what will appear.
8. What nuget package you add at start when you create a project in MVC?
9. What is sql injection and how will you prevent it?
10. How do you secure application credential? mean where will you store credential window or sql.
11. What is DLP (Data loss prevention)? How will you implement it?
12. If you a database and running in production and its size gradually increasing than how will you restrict it?

13. How will you link two database running on different machine?
Ans. sp_addlinkedserver can be used to link two database.

14. What difference between CTE and temp table.
15. TempData vs ViewBag
16. Stored Procedure vs Function
17. What if we have dynamic query in SP will it compile or not?
18. How many type of HTML helper methods?
Ans 
1. Inline Http Helper
2. Built is Html Helper 
3. Custom HTML Helper

https://dzone.com/articles/inline-and-custom-html-helpers-in-aspnet-mvc 

19. How will you create your own custom http helper method.
20. How do you implement route in MVC?
21. What is merge statement?

Monday, March 26, 2018

Sopra Steria

1.What is MVC life cycle?
2.What is FormBuilder?
3.What is Form Group?
4.How will unit test in angular2
5.How will you optimize sql squery ?
6.How to implement security in MVC?
7. How will you use Web API?
8. What is the alternate of boxing and unboxing?

Tuesday, March 13, 2018

Rategain

1. How can you prevent a cleint by using Action method in MVC?
Ans using ChildActionOnly attribute

2. How can you add extra paramtere in a function wihtout updating method in Web API?
Ans: Send non primtive Data in the form of class object , then you can add properties in class.

3. What are child Action method?
Ans:

A ChildAction method is an action method thought its accessible from the View only, if you invoked this action via an URL then it prompts you an error that we will look down the level in this article.

How to use in View

@Html.Action("SomeActionName", "SomeController")
But can not call it from url.

4. What are Mutex and Monitor?
5. Can we use commit with datareader?
6. class abc{
int i=0;
abc(){
i=i+1;
}
}

abc obj = new abc();

If two client access at same time how will you ensure both would get updated value of i.

7. class test
{
int i;
string str;

}
static void main(args[] arg){
int j;
test a = new test();
}
8. Table A contains following data

Id Name
1 A
2 B
3 C

Table B contains following data

Id Name
1
1
2
2
3
3

Update table B with the help of Table A.

Followers

Link

Labels