Summary


This chapter discussed the new features of SQL Server 2005 as they relate to CLR functionality. The CLR is hosted by SQL Server, so it is possible to create user-defined types, aggregates, stored procedures, functions, and triggers with C#.

User-defined types have some strict requirements in the .NET class for conversion to and from a string. How the data is stored internally in SQL Server depends on the format that is defined in the type. User-defined aggregates make it possible to do a custom accumulation using .NET classes. With stored procedures and functions, it is possible to make use of CLR classes for server-side code.

Using CLR with SQL Server doesn’t mean that T-SQL is obsolete. You’ve seen that T-SQL has advantages because it requires less code if only data-intensive queries are done. CLR classes can have advantages in data-processing if .NET features such as cryptography come into play.

You’ve also had a glance into the XML data type of SQL Server to combine XQuery expressions with T-SQL statements.




Professional C# 2005 with .NET 3.0
Professional C# 2005 with .NET 3.0
ISBN: 470124725
EAN: N/A
Year: 2007
Pages: 427

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net