WCF Interview Questions and Answers Part 9

1. Will TryUpdateModel accessible in wcf service library?

Ans. No, TryUdateModel is not accessible outside mvc project.
          if (TryUpdateModel(RecordFound))

2. How to implement editing entity in wcf service library which access database using entity framework?

Ans. To edit an entity using entity framework in wcf, the following code works well.
 Cntxt.Entry(TargetItem).State = EntityState.Modified;

3. How to view markup section of wcf service file?
Ans. Simply right click on ".svc" file and select "view markup".

4. In the following element, what is the meaning of address=""?
<endpoint address="" binding="wsHttpBinding" contract="CSample.IContract">
 <dns value="localhost"/>

Ans. Here address="" means it will refer localhost.

5. In vs2013, SvcConfigEditor is replaced with which name?
Ans. On vs2013 SvcConfigEditor is renamed with "Edit WCF configuration".
In WCF project --> right click on "webconfig" file --> Edit WCF config



Receive Quality Tutorials Straight in your Inbox by submitting your Email below:

Delivered by FeedBurner

Protected by Copyscape Duplicate Content Checker