CodeSmart Inc's blog has been moved to a Word-Press based blog on our http://www.codesmartinc.com/ website.
Check it out at : www.CodeSmartInc.com/Smart-Bytes/
All of the latest stuff we think about, including JQuery/AJAX implementation options, Silverlight Offline systems sample code, Training materials, and more... can be found there!
Thanks again,
Chad W. Stoker
President & CTO
CodeSmart Inc
Sunday, March 13, 2011
Wednesday, July 7, 2010
Great T4 Template blog
Check out this blog by Oleg Sych.
It covers a lot of ground but is a great place to get going writing T4 Templates.
http://www.olegsych.com/2007/12/text-template-transformation-toolkit/
It covers a lot of ground but is a great place to get going writing T4 Templates.
http://www.olegsych.com/2007/12/text-template-transformation-toolkit/
Thursday, May 20, 2010
CodeSmart Inc at the IPMA 2010
CodeSmart Inc completed a successful series of presentations at the IPMA forum this year. There were about 50 companies and many staff from various government agencies in attendance. All-in-all, it was a good event.
Below are the slide-decks to the 2 presentations we had.
1) Getting to know the UIAutomation Framework. How it can streamline your integration testing!
2) Mobile Application Development. The future of retrieving information from your cell phone!
Here are the links :
Mobile Phone Development
UIAutomation Framework (coming soon)
Below are the slide-decks to the 2 presentations we had.
1) Getting to know the UIAutomation Framework. How it can streamline your integration testing!
2) Mobile Application Development. The future of retrieving information from your cell phone!
Here are the links :
Mobile Phone Development
UIAutomation Framework (coming soon)
Sunday, March 28, 2010
Enabling Serialization for DBML files
By default WCF uses Data Contract Serialization which is a slightly more verbose form of XML serialization. And the method to serialize objects using Data Contract serialization is much the same as normal XML serialization. It is just a matter of appending attributes at the beginning of your class and member definitions.
[DataContract()]
[DataMember(Order=n)]
Wherever required. *n indicates the sequence.
So we can go into each dbml file and add these attrubutes and Data Contract Serialization is ready to go.
However... there is a much easier way to do this.
Simply open the properties of the dbml file (from the context menu or the designer or the view menu) and change the Serialization Mode property from 'None' to 'Unidirectional'.
[DataContract()]
[DataMember(Order=n)]
Wherever required. *n indicates the sequence.
So we can go into each dbml file and add these attrubutes and Data Contract Serialization is ready to go.
However... there is a much easier way to do this.
Simply open the properties of the dbml file (from the context menu or the designer or the view menu) and change the Serialization Mode property from 'None' to 'Unidirectional'.
Friday, January 15, 2010
Linq - How awesome can it get?
Hi All. I wanted to start a spot with a focus on Linq queries and/or general awesome use (and quite possibly awesome overkill) of Linq.
To start it off, a couple of us needed a month drop down list and decided to go to overkill land and came up with this:
using System.Globalization;
public static ListItem[] MonthNames
{
    get
    {
        int count = 1;
        return (from m in CultureInfo.CurrentCulture.DateTimeFormat.MonthNames.Where(
s => !string.IsNullOrEmpty(s))
            select new ListItem()
            {
                Value = count.ToString(),
                Text = m,
                Selected = DateTime.Now.Month == count++
            }).ToArray();
    }
}
We wanted to integrate the count into the linq but didn't quite make it. You might also ask why we did the IsNullOrEmpty? Well, in the CultureInfo MonthNames there are 13 months (for places like Ethiopia (if I remember correctly) but it is empty in our locale.
This query builds ListItems with Values that are the numerical month and Text that is the month names, and the current month is selected.
I defy you to come up with something more awesome!
To start it off, a couple of us needed a month drop down list and decided to go to overkill land and came up with this:
using System.Globalization;
public static ListItem[] MonthNames
{
    get
    {
        int count = 1;
        return (from m in CultureInfo.CurrentCulture.DateTimeFormat.MonthNames.Where(
s => !string.IsNullOrEmpty(s))
            select new ListItem()
            {
                Value = count.ToString(),
                Text = m,
                Selected = DateTime.Now.Month == count++
            }).ToArray();
    }
}
We wanted to integrate the count into the linq but didn't quite make it. You might also ask why we did the IsNullOrEmpty? Well, in the CultureInfo MonthNames there are 13 months (for places like Ethiopia (if I remember correctly) but it is empty in our locale.
This query builds ListItems with Values that are the numerical month and Text that is the month names, and the current month is selected.
I defy you to come up with something more awesome!
Subscribe to:
Posts (Atom)