Add project files.
This commit is contained in:
66
OfflineDemoSql/OfflineDemoSql.sqlproj
Normal file
66
OfflineDemoSql/OfflineDemoSql.sqlproj
Normal file
@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<Name>OfflineDemoSql</Name>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectVersion>4.1</ProjectVersion>
|
||||
<ProjectGuid>{4e520d7d-be86-466c-a70f-4b69be5c698b}</ProjectGuid>
|
||||
<DSP>Microsoft.Data.Tools.Schema.Sql.SqlAzureV12DatabaseSchemaProvider</DSP>
|
||||
<OutputType>Database</OutputType>
|
||||
<RootPath>
|
||||
</RootPath>
|
||||
<RootNamespace>OfflineDemoSql</RootNamespace>
|
||||
<AssemblyName>OfflineDemoSql</AssemblyName>
|
||||
<ModelCollation>1033, CI</ModelCollation>
|
||||
<DefaultFileStructure>BySchemaAndSchemaType</DefaultFileStructure>
|
||||
<DeployToDatabase>True</DeployToDatabase>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<TargetLanguage>CS</TargetLanguage>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<SqlServerVerification>False</SqlServerVerification>
|
||||
<IncludeCompositeObjects>True</IncludeCompositeObjects>
|
||||
<TargetDatabaseSet>True</TargetDatabaseSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<BuildScriptName>$(MSBuildProjectName).sql</BuildScriptName>
|
||||
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<BuildScriptName>$(MSBuildProjectName).sql</BuildScriptName>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">11.0</VisualStudioVersion>
|
||||
<!-- Default to the v11.0 targets path if the targets file for the current VS version is not found -->
|
||||
<SSDTExists Condition="Exists('$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets')">True</SSDTExists>
|
||||
<VisualStudioVersion Condition="'$(SSDTExists)' == ''">11.0</VisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
<Import Condition="'$(SQLDBExtensionsRefPath)' != ''" Project="$(SQLDBExtensionsRefPath)\Microsoft.Data.Tools.Schema.SqlTasks.targets" />
|
||||
<Import Condition="'$(SQLDBExtensionsRefPath)' == ''" Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" />
|
||||
<ItemGroup>
|
||||
<Folder Include="Properties" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Build Include="Shorts.sql" />
|
||||
<Build Include="spShorts_CreateNew.sql" />
|
||||
<Build Include="spShorts_AddUploadedFiles.sql" />
|
||||
<Build Include="spShorts_GetAll.sql" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
10
OfflineDemoSql/Shorts.sql
Normal file
10
OfflineDemoSql/Shorts.sql
Normal file
@ -0,0 +1,10 @@
|
||||
CREATE TABLE [dbo].[Shorts]
|
||||
(
|
||||
Id INT IDENTITY(1,1) PRIMARY KEY,
|
||||
Title NVARCHAR(100) NOT NULL,
|
||||
Description NVARCHAR(300),
|
||||
Hashtags NVARCHAR(75),
|
||||
Mp4FileUrl NVARCHAR(1024),
|
||||
ImageFileUrl NVARCHAR(1024),
|
||||
[IsUploaded] BIT NOT NULL DEFAULT 0
|
||||
)
|
||||
10
OfflineDemoSql/spShorts_AddUploadedFiles.sql
Normal file
10
OfflineDemoSql/spShorts_AddUploadedFiles.sql
Normal file
@ -0,0 +1,10 @@
|
||||
CREATE PROCEDURE [dbo].[spShorts_AddUploadedFiles]
|
||||
@id int,
|
||||
@mp4FileUrl nvarchar(1024),
|
||||
@imageFileUrl nvarchar(1024)
|
||||
AS
|
||||
begin
|
||||
update dbo.Shorts
|
||||
set Mp4FileUrl = @mp4FileUrl, ImageFileUrl = @imageFileUrl
|
||||
where Id = @id;
|
||||
end
|
||||
11
OfflineDemoSql/spShorts_CreateNew.sql
Normal file
11
OfflineDemoSql/spShorts_CreateNew.sql
Normal file
@ -0,0 +1,11 @@
|
||||
CREATE PROCEDURE [dbo].[spShorts_CreateNew]
|
||||
@title nvarchar(100),
|
||||
@description nvarchar(300),
|
||||
@hashtags nvarchar(75)
|
||||
AS
|
||||
begin
|
||||
insert into dbo.Shorts (Title, [Description], Hashtags)
|
||||
values (@title, @description, @hashtags);
|
||||
|
||||
select cast(SCOPE_IDENTITY() as int);
|
||||
end
|
||||
7
OfflineDemoSql/spShorts_GetAll.sql
Normal file
7
OfflineDemoSql/spShorts_GetAll.sql
Normal file
@ -0,0 +1,7 @@
|
||||
CREATE PROCEDURE [dbo].[spShorts_GetAll]
|
||||
|
||||
AS
|
||||
begin
|
||||
select [Id], [Title], [Description], [Hashtags], [Mp4FileUrl], [ImageFileUrl], [IsUploaded]
|
||||
from dbo.Shorts;
|
||||
end
|
||||
Reference in New Issue
Block a user