tailieunhanh - Introducing Windows Azure- P56

Introducing Windows Azure- P56:The cloud platform is getting more and more attractive to the computing world. Today, service-oriented architecture (SOA) and aspect-oriented programming (AOP) techniques are widely used in enterprise solutions. A question an IT management team or a software development team may ask is, what is the next trend going to be? Cloud computing seems to be the right answer. | CHAPTER 8 SQL AZURE public class SOLDataAccessHelper protected SOLDatabaseAccessRoot sqlDatabaseAccessRoot null region Constructors public SOLDataAccessHelper SOLDatabaseAccessRoot sqlDatabaseAccessRoot sqlDatabaseAccessRoot sqlDatabaseAccessRoot public SOLDataAccessHelper SOLDatabaseAccessRoot sqlDatabaseAccessRoot string connectionstring this sqlDatabaseAccessRoot Connectionstring connectionstring endregion region Properties public string Connectionstring get set public string ConnectedDatabase get string database string split Server ConnectionString Server ConnectionString Data Source if null split 1 string strValue split - 1 int indexEnd try database 0 indexEnd catch return database endregion region Public Methods public StringBuilder Execute string subject ref Object results 273 CHAPTER 8 SQL AZURE StringBuilder sb null if null sqlDatabaseAccessRoot SQLDatabaseAccessRootSqlDataService dataService this. .FirstOrDefault SQLDatabaseAccessRootSqlDataService x subject if null dataService if sb ExecuteQuery else if sb ExecuteStoredProcedure dataService else throw new ApplicationException SqlDatabaseService Query Subject 0 SqlDatabaseService is not initialized correctly. subject return sb public StringBuilder ExecuteSelected string selectedText return ExecuteQuery selectedText public bool CreateStoredProcedure string storedProcedureName string storedProcedureBody SQLDatabaseAccessRootSqlDataServiceCommand serviceCommand bool success false StoredProcedure stroredProcedure null if null storedProcedureName null storedProcedureBody null serviceCommand storedProcedureName .