This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TRIGGER EmployeeTrigger | |
ON dbo.Employee | |
AFTER INSERT | |
AS EXTERNAL NAME | |
MulawaSqlServerCLRTriggers.[Mulawa.SqlServer.CLRTriggers.Triggers].EmployeeTrigger |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE ASSEMBLY MulawaSqlServerCLRTriggers | |
FROM '[PATH]\CLRTriggers\Mulawa.SqlServer.CLRTriggers\bin\Debug\Mulawa.SqlServer.CLRTriggers.dll' | |
WITH PERMISSION_SET = EXTERNAL_ACCESS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ALTER DATABASE CLRDatabase SET TRUSTWORTHY ON; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EXEC sp_configure 'show advanced option',1 | |
GO | |
RECONFIGURE | |
GO | |
EXEC sp_configure 'clr enabled',1 | |
GO | |
RECONFIGURE | |
GO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GO | |
ALTER DATABASE CLRDatabase SET TRUSTWORTHY ON; | |
GO | |
CREATE ASSEMBLY WeatherClient | |
FROM '[PATH]\CLRTriggers\SharedLib\Weather.com.Client.dll' | |
WITH PERMISSION_SET = EXTERNAL_ACCESS | |
GO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE dbo.Configuration | |
( | |
PartnerId NVARCHAR(20) NOT NULL, | |
LicenseKey NVARCHAR(20) NOT NULL, | |
WeatherForecastDays INT NOT NULL | |
) | |
GO | |
INSERT INTO dbo.Configuration(PartnerId, | |
LicenseKey, | |
WeatherForecastDays) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use master; | |
GO | |
CREATE DATABASE CLRDatabase; | |
GO | |
use CLRDatabase; | |
GO | |
CREATE TABLE dbo.Employee | |
( | |
FullName NVARCHAR(50) PRIMARY KEY NOT NULL, | |
City NVARCHAR(20) NOT NULL, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WeatherClient client = new WeatherClient( | |
"[Partner Id here]" | |
, "[License Key here]"); | |
List<Location> locations = client.GetLocation("Warsaw,Poland"); | |
Location location = locations[0]; | |
//when querying service for 3 days, | |
//it will return information for today and 2 following days. | |
int days = 3; | |
ForecastWeatherInfo weatherForecast = client.GetWeatherForecast( | |
location |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WeatherClient client = new WeatherClient( | |
"[Partner Id here]" | |
, "[License Key here]"); | |
List<Location> locations = client.GetLocation("Warsaw,Poland"); | |
Location location = locations[0]; | |
CurrentWeatherInfo conditions = client.GetCurrentConditions(location); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WeatherClient client = new WeatherClient( | |
"[Partner Id here]" | |
, "[License Key here]"); | |
List<Location>= client.GetLocation("Warsaw,Poland"); |