Wednesday, May 4, 2011

BizTalk 70-595 Study Resources

I have started preparing for exam 70-595: Developing Business Process and Integration Solutions by Using Microsoft BizTalk Server 2010.
Being BizTalk 2006 R2 certified i don't expect much changes in the current exam. 
But i'll find out soon, at-least sooner than the 2nd shot offer expires :-) 

Here is the list of resources that I'll be using to prepare for Exam 70-595

  • Virtual Labs: Give that Hyper-v a run for its money!
  • Videos : A series of BizTalk How do I videos, great for beginners.
  • Training Kit :  A must download for any BizTalk developer
  • BizTalk Hotrod: Full of excellent articles from BizTalk MVP's
Happy BizTalking!

Wednesday, March 2, 2011

Linq union on anonymous types

Recently in my project, i was trying to do a LINQ union on two anonymous types. The compiler didn't seem to be happy with it. Here is what i was trying to do:
var query = (from t in taskRepository
                         join s in stepRepository on t.TaskID equals s.ID
                         where t.UserID == 420
                         select new{ID = t.ID,DisplayText = t.DisplayText,ReviewStepID = null
                         })
                       .Union
                       (from rs in reviewStepsRepository
                        where rs.ReviewTypeID == 2
                        select new{ID = null,DisplayText = rs.ReviewName,ReviewStepID = rs.ID
                        })
                       .OrderByDescending(o => o.ID);
With some research, ended up creating a class with ID,DisplayText and ReviewStepID
 public class MyTask
          {
                public int? ID { getset; }
                             public string DisplayText { getset; }
                             public int? ReviewStepID { getset; }
           }
And, the happy LINQ query looked like below:
var query = (from t in taskRepository
                     join s in stepRepository on t.TaskID equals s.ID
                     where t.UserID == 420
                     select new MyTask() { ID = t.ID,                                            
                                          DisplayText = t.DisplayText,
                                          ReviewStepID = null  
                                       }) .Union 
                                         (from rs in reviewStepsRepository
                                          where rs.ReviewTypeID == 2
                                          select new MyTask() { ID = null, 
                                                                DisplayText = rs.ReviewName, 
                                                                ReviewStepID = rs.ID })
                        .OrderByDescending(o=>o.ID); 
Happy LINQ'ING!!!

Thursday, February 10, 2011

C# POCO Entity Generator

C# POCO Entity Generator is a T4 template to generate persistent ignorant entities from an Entity Data Model.
For a complete walk-through refer ADO.NET Team Blog

Thursday, September 23, 2010

BizTalk 2010 -Free Developer Edition

I am super excited about this. A freely down-loadable version of BizTalk 2010 available here.
More information on msdn blog.

Wednesday, September 1, 2010

Table Looping and Table Extractor Functoid in BizTalk

In my recent project I had two requirements for mapping
1.    Map fixed number of elements from source to repeating elements in the destination message.
2.    And Map only if  the value in one of the element exists

Solution: Table Looping and Table Extractor Functoid

Here is a good blog post on using Table Looping and Table Extractor functoid that I referred.
http://hestia.typepad.com/flatlander/2007/01/mapping_fixed_e.html

In order to satisfy the requirement number 2 above I used the Not Equal functoid and connected it to the table looping functoid. Under Configure Table Looping Grid used the output from Not Equal functoid as Column 1 and checked the gated checkbox.

The configure table looping grid looks like below

Friday, July 23, 2010

Getting Received File Name in BizTalk

I wanted to store the name of the file that was received at the Receive port in BizTalk.
So, I went ahead and used the following in the expression shape to get the filename from the message property:

strFileName= MyMessage((FILE.ReceivedFileName)

But the property above returns the filename with complete file path.

And thats where System.IO namespace comes into the picture.
The handy GetFileName method below does the parsing for you, and returns the filename sweet!

strFileName = System.IO.Path.GetFileName(MyMessage(FILE.ReceivedFileName))

Happy BizTalking!