Please use the reaction widget in every post to let me know if you found the post helpful. Appreciate your time to give me feedback. Thanks!!!
Monday, January 26, 2009
Jan quizzes in Chennai
The Mylapore quiz was a part of the Mylapore Festival that is fast becoming one of the famous neighborhood events in the city. The quiz master for the afternoon was Ashwin Prabhu. There was a prelims of 20 questions followed by the finals which was 6rounds.
The questions were very well framed and the enthusiasm of the participantsand their love for Mylapore was quite evident. The team of V.V. Ramanan and Ram Shankar walked away with the laurels. Overall the quiz was a very good experience. For somebody who is trying to get back to quizzing regularly, it was very enjoyable. Thanks to Ashwin and Srinivas for putting together a set of intriguing questions.
The second quiz was the India Unplugged conducted by the India Quizzing League. Personally, I thought the quiz would have had better participation if it was slotted in the evening. The quiz was scheduled at 09.30 AM in the morning. Karthik Narayanan started off the quiz with a fun question on JK Rithish. The prelims was a set of 30 questions. Again 6 teams got into the finals. This is where the quiz started to falter I thought. The questions for the finals could have been thought out better. Infact, the quiz seemed to get very long and the third round was a bit dry. I couldn’t stay till the end but kudos to the IQL Team for putting up this quiz. Jan 26th Is usually the date for the Odyssey Quiz but that didn’t happen this year. The IQL Team came forward and filled the void. This can only get better.
Tuesday, September 16, 2008
ADO.NET Data Services - Part - III
To work with ADO.NET Data Services, you should ensure that you have .NET 3.5 Framework SP1 installed. Apart from ADO.NET Data Services SP1 brings to the table a lot of new features. For a list of new features in SP1 refer to this link (VS 2008 and .NET 3.5 SP1 Features).
Once you have the SP1 installed, open VS 2008 and open a new web application. Right click on the solution and add a new ADO.NET Data Entity model. The extension of the file will be edmx. A wizard will guide you through the process of creating an entity model based on a selected database. I will not get into the details of the wizard for the sake of brevity. The wizard is quite self-explanatory. The only thing worth mentioning is to set support for MARS resultsets in your advanced window when you click new connection.
Once you have run through the wizard, depending on the tables you have selected you will see a data model like the one shown in the picture.
You can also create an entity model only for the tables you want, by selecting the appropriate tables in the wizard. We will now go on to add the ADO.NET Data Service. You can do this by opening the add new item dialog box and selecting ADO.NET Data Service from it.
Once you have added the svc, you will see the code behind. Lets take a look at the only method that exists.
The method InitializeService is the first method that will be called when your service is invoked. Any code that you write in this method is applicable to all the data models that you expose through your web service. One of the key things that you will do here is taking care of security. Though .NET gives us some built-in methods to set rights, more often than not we will be writing our code to monitor these accesses. The InitializeService gives us a single place where we can write code for access privileges for the whole service.
Coming back to the code behind, there are a couple of things you have to change in here to get it up and working. You will have to include the name of the datasource class in your servce name declaration. Replace the “/* TODO: put your data source class name here */ with the name of your entity class. You can find out the name of the entity class by looking the class name from the designer.cs file.
Build and run the solution. You will get a response like the one shown in the picture. This is because currently you have not set the rights. To view or access the exposed services, you should give rights explicitly.
Open your code editor. In your InitializeMethod uncomment the two statements
config.SetEntitySetAccessRule("MyEntityset", EntitySetRights.AllRead);
config.SetServiceOperationAccessRule("MyServiceOperation", ServiceOperationRights.All);
Replace the “MyEntitySet” with the name of the Entity and “MyServiceOPeration” with the name of the operation or the methods that you write. To provide access to all the entities and the operations use “*”. In my code for testing, this is what I have done.
config.SetEntitySetAccessRule("*", EntitySetRights.AllRead);
config.SetServiceOperationAccessRule("*", ServiceOperationRights.All);
That’s it!! Your service is now ready to be accessed. Build and run the solution again. You will see something like below. Look at how the results have changed just by including those two lines in the InitializeService method.
One thing I would like you to note is the format of the data. In the above example, data is being returned as ATOM feeds.
Now that we have built a service, we next have to build a client to access this service. More of that in the next part. Happy Coding!!!
Saturday, September 13, 2008
This is Anfield!!!!
How long does it take to travel from Cloud nine to Earth? If you ask Sir Alex this question, his answer would be 90 minutes. Because that’s exactly what Man Utd. Went through on their trip to
The start was anything but uneventful. The starting line-ups were pre-cursors to what was to follow. No Gerrard; No Torres for Liverpool and
There were the likes of Rooney, Tevez, Berbatov, Kuyt and Keane on the pitch but the irony was all the three goals were scored due to big defensive lapses. Javier Masceranho was the first culprit for not tracking Tevez’s run into the middle.Unmarked Tevez netted Berbatov’s cross in the 3rd minute to give United the lead. Most of
Second half continued to be more embarrassment for the visitors. Ryan Giggs came in for Carrick. It seemed as if the substitution would work when his long distance drive was on target making Reina stretch to keep it out. As it turned out that wouldn’t be Giggs most significant moment in the game.
The victory now leaves Liverpool top of the table but