The opinions expressed in these materials are my own and are not necessarily those of Microsoft.
Copyright © Microsoft Corporation. All rights reserved. Unless otherwise indicated, all source code provided is licensed under the Microsoft Public License (Ms-PL).
The perfect blend of spices and herbs to make just the right amount of database goodness:
I had planned on doing a big article on this and it turns out someone beat me to the punch. Dinesh wrote a great article on this that can be found here:
It must be inevitable that whenever we come out with a new version of Visual Studio and the Framework that the rumor mill starts pumping. This is my first VS Launch since I joined Microsoft and there is one rumor in particular that I find very funny. The rumor goes something like this: "Microsoft is going to phase out Visual Basic eventually and replace it with [insert something here]"
Who comes up with this stuff? Seriously. Why on Earth would be kill VB? Can you really give me one good reason? At this point I know the C#-only crowd is saying, "Cause VB sucks!". Okay, if we take the "Tastes Great / Less Filling" war out of the equation why would MS kill VB? The answer is simple: We wouldn't. VB has some very distinct advantages in some areas over C# that make it a great language to have available. Most notably VB has a much lower learning curve than C# and thus serves as a great way for developers to transition to the language particularly if they are new to programming.
Additionally, there are some pretty cool things that can only be done in VB. I'm thinking of the LINQ to XML language enhancements that VB coders can take advantage of by writing actual tags in their code. VERY COOL! VB just rocks!
So the next time you hear someone saying that VB is "going away" make sure to slap them around a bit until they come to their senses (or you get tired). VB is here to stay! :)
If you are going to an InstallFest then you definitely wan to check out Chris Koenig's latest post on Q&A about the event:
Is Silverlight like crack to you? Did you get dry heaves when you discovered that the templates for 1.1 weren't available in VS2008? Well, fret no more. Thanks to the timely email from my bud, Phil Wheat, the good stuff is here for you:
Then you need to go here:
If you had Orcas Beta 2 on your machine and now want to install the RTM bits then you need to check out Scott's post on uninstalling the beta bits to avoid much pain and suffering:
Hope everyone had a great Thanksgiving and want to give a special shout out to our troops over in Iraq! Happy Thanksgiving and looking forward to a great Christmas! Here's hoping everyone is as chilled out as this:
I think the turkey put them into a coma :P
Now that we have VS2008 did you know there is a command line tool to generate classes for you (just like the designer does) to be used with LINQ to SQL? Yep, it's called SQLMetal and you get to it by going to the Visual Studio Command Prompt.
I have taken the liberty of regurgitating the help here:
Microsoft (R) Database Mapping Generator 2008 version 1.00.21022for Microsoft (R) .NET Framework version 3.5Copyright (C) Microsoft Corporation. All rights reserved.
SqlMetal [options] [<input file>]
Generates code and mapping for the LINQ to SQL component of the .NET framework. SqlMetal can: - Generate source code and mapping attributes or a mapping file from a database. - Generate an intermediate dbml file for customization from the database. - Generate code and mapping attributes or mapping file from a dbml file.
Options: /server:<name> Database server name. /database:<name> Database catalog on server. /user:<name> Login user ID (default: use Windows Authentication). /password:<password> Login password (default: use Windows Authentication). /conn:<connection string> Database connection string. Cannot be used with /server, /database, /user or /password options. /timeout:<seconds> Timeout value to use when SqlMetal accesses the database (default: 0 which means infinite).
/views Extract database views. /functions Extract database functions. /sprocs Extract stored procedures.
/dbml[:file] Output as dbml. Cannot be used with /map option. /code[:file] Output as source code. Cannot be used with /dbml option. /map[:file] Generate mapping file, not attributes. Cannot be used with /dbml option.
/language:<language> Language for source code: VB or C# (default: derived from extension on code file name). /namespace:<name> Namespace of generated code (default: no namespace). /context:<type> Name of data context class (default: derived from database name). /entitybase:<type> Base class of entity classes in the generated code (default: entities have no base class). /pluralize Automatically pluralize or singularize class and member names using English language rules. /serialization:<option> Generate serializable classes: None or Unidirectional (default: None). /provider:<type> Provider type: SQLCompact, SQL2000, or SQL2005. (default: provider is determined at run time).
<input file> May be a SqlExpress mdf file, a SqlCE sdf file, or a dbml intermediate file.
Create code from SqlServer: SqlMetal /server:myserver /database:northwind /code:nwind.cs /namespace:nwind
Generate intermediate dbml file from SqlServer: SqlMetal /server:myserver /database:northwind /dbml:northwind.dbml /namespace:nwind
Generate code with external mapping from dbml: SqlMetal /code:nwind.cs /map:nwind.map northwind.dbml
Generate dbml from a SqlCE sdf file: SqlMetal /dbml:northwind.dbml northwind.sdf
Generate dbml from SqlExpress local server: SqlMetal /server:.\sqlexpress /database:northwind /dbml:northwind.dbml
Generate dbml by using a connection string in the command line: SqlMetal /conn:"server='myserver'; database='northwind'" /dbml:northwind.dbml
Here are some helpful links on how to use SQLMetal to your advantage:
Does anyone like going to the doctor? Seriously? Even if you like your doctor I can't think that anyone really looks forward to the experience. As I was sitting in the waiting room to see my doctor I couldn't help but wonder if someone had decided to skip the trip to Disney World in favor of going to hang out at the doctor office. Plus, am I the only one that is afraid of the other patients? I mean, when this one guy came in wheezing and coughing I was thinking, "Wow, I'm gonna walk in with a cold and walk out with Ebola--nice." Incidentally, that is why I'm not too hip on hospitals either. How exactly does being around sick people make you better?
Which brings me to the main reason I decided to go off on this rant: travel. Many of you will be traveling over the holidays and I thought you might like to go with some key points to avoid getting ill if you are flying:
NOTE: In the interest of full disclosure I got the idea from a recent segment on Fox News
Here are some other links to help if you are flying:
If you have some favorite links for traveling by any mode of transportation make sure to post them :)