Thursday, February 1, 2018


1.   What is the first step to create WCF service?
Ans: 1. Select the project type class library.
2. Add a class named Calc.
3. Add a namespace System.Runtime.Serialization.
4. Decorate the class with DataContratc.
5. Decorate the member with DataMember
6. Decorate the methods with OpertaionContract.
7. Add an interface named ICalcService.
8. Add a namespace System.ServiceModel
9. Decorate the interface with ServiceContract.
10. Decorate the method declaration with OperationContract.
11. Implement the class with interface ICalsService
12. Add ServiceBehavior attribute on class
[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)]
13. Add the App.config and Edit it.

2.   What are Instance Mode?
3.   What are Concurrency Mode?
4.   Which is better WCF or Web APi?
5.   If we have two client desktop and Mobile what will you create?
6.   Where will be the entityframe work used in WPF or in WCF?
7.   How model will update while updating database in entity-framework?
Ans : Right clicking on your EDMX file and selecting Open With -> ADO.NET Entity Data Model Designer
Right click on the designer surface of the EDMX designer and click Update Model From Database...
All entities are refreshed by default, new entities are only added if you select them.

8.   What is renterent mode?
9.   What are the resources in WPF?
10. If you have user control consisting text block where will you create resources?
11. Can we mix Data Contract and Message Contract both in a single class?
Ans : No
 Mixing message and data contracts will cause a run time error when you generate WSDL from the service.
12. What is binding?
13. How will you fast a WPF application?
14. What are the ways of DataContext?
Ans. Xaml and in Code behind
Xaml is better.

No comments: