Upgrade to .NET 4.6.1. Default to connection string using local instance of sql server. Added setup instruction in readme
This commit is contained in:
parent
4807c2fbb6
commit
32ce3953d8
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio 14
|
# Visual Studio Version 16
|
||||||
VisualStudioVersion = 14.0.25420.1
|
VisualStudioVersion = 16.0.29920.165
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{00D1A9C2-B5F0-4AF3-8072-F6C62B433612}") = "ProjectDB", "ProjectDB\ProjectDB.sqlproj", "{58D1E657-AA21-497F-BA9C-634D6DA2D921}"
|
Project("{00D1A9C2-B5F0-4AF3-8072-F6C62B433612}") = "ProjectDB", "ProjectDB\ProjectDB.sqlproj", "{58D1E657-AA21-497F-BA9C-634D6DA2D921}"
|
||||||
EndProject
|
EndProject
|
||||||
@ -9,6 +9,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Web", "Web\Web.csproj", "{F
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj", "{6C10F27E-A278-4801-8AC7-929212274D85}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj", "{6C10F27E-A278-4801-8AC7-929212274D85}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{5FC57735-E720-490F-AB66-1EEC6F7A26B4}"
|
||||||
|
ProjectSection(SolutionItems) = preProject
|
||||||
|
README.md = README.md
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@ -33,4 +38,7 @@ Global
|
|||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {F2D2A54A-021F-4976-A139-0364135E456F}
|
||||||
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
|
@ -65,6 +65,7 @@
|
|||||||
<Build Include="Tables\product.sql" />
|
<Build Include="Tables\product.sql" />
|
||||||
<Build Include="Tables\order.sql" />
|
<Build Include="Tables\order.sql" />
|
||||||
<Build Include="Tables\orderproduct.sql" />
|
<Build Include="Tables\orderproduct.sql" />
|
||||||
|
<Build Include="PopulateDB.sql" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<RefactorLog Include="ProjectDB.refactorlog" />
|
<RefactorLog Include="ProjectDB.refactorlog" />
|
||||||
|
18
README.md
18
README.md
@ -19,3 +19,21 @@ Change the AttachDbFile name to the full path of the BrainWare.mdf file (located
|
|||||||
|
|
||||||
## Original Output Example
|
## Original Output Example
|
||||||
![page image](output.GIF?raw=true)
|
![page image](output.GIF?raw=true)
|
||||||
|
|
||||||
|
|
||||||
|
## Setup
|
||||||
|
|
||||||
|
### Database Setup
|
||||||
|
- Start SQL Server Management Studio as Administrator
|
||||||
|
- Once conntected to your local SQL Server instance
|
||||||
|
- Right click on the Database node and select attach
|
||||||
|
- Select the file BrainWare\Web\App_Data\BrainWare.mdf
|
||||||
|
|
||||||
|
- You can also deploy the project ProjectDB to your local SQL Server instance
|
||||||
|
- Then execute in SQL Server Management Studio the file BrainWare\ProjectDB\PopulateDB.sql
|
||||||
|
|
||||||
|
### Visual Studio
|
||||||
|
- Open solution BrainWare\BrainWare.sln
|
||||||
|
- Set the project Web, as the start up project
|
||||||
|
- Press F5
|
||||||
|
- Execpted a browser is open with the result of the first order
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
Note: Add entries to the App.config file for configuration settings
|
Note: Add entries to the App.config file for configuration settings
|
||||||
that apply only to the Test project.
|
that apply only to the Test project.
|
||||||
@ -23,4 +23,4 @@
|
|||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
</configuration>
|
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/></startup></configuration>
|
||||||
|
@ -11,9 +11,10 @@
|
|||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>Tests</RootNamespace>
|
<RootNamespace>Tests</RootNamespace>
|
||||||
<AssemblyName>Tests</AssemblyName>
|
<AssemblyName>Tests</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||||
|
<TargetFrameworkProfile />
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
@ -14,12 +14,14 @@ namespace Web.Infrastructure
|
|||||||
|
|
||||||
public Database()
|
public Database()
|
||||||
{
|
{
|
||||||
_connection = new SqlConnection("Data Source=(LocalDb)\\MSSQLLocalDB;Initial Catalog=BrainWAre;Integrated Security=SSPI;AttachDBFilename=D:\\BrainWare\\Web\\App_Data\\BrainWare.mdf");
|
// var connectionString = "Data Source=(LocalDb)\\MSSQLLocalDB;Initial Catalog=BrainWAre;Integrated Security=SSPI;AttachDBFilename=D:\\BrainWare\\Web\\App_Data\\BrainWare.mdf"
|
||||||
|
var connectionString = "Data Source=LOCALHOST;Initial Catalog=BrainWare;Integrated Security=SSPI";
|
||||||
|
|
||||||
|
_connection = new SqlConnection(connectionString);
|
||||||
|
|
||||||
_connection.Open();
|
_connection.Open();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public DbDataReader ExecuteReader(string query)
|
public DbDataReader ExecuteReader(string query)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -1,17 +1,29 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0"?>
|
||||||
<!--
|
<!--
|
||||||
For more information on how to configure your ASP.NET application, please visit
|
For more information on how to configure your ASP.NET application, please visit
|
||||||
http://go.microsoft.com/fwlink/?LinkId=301879
|
http://go.microsoft.com/fwlink/?LinkId=301879
|
||||||
-->
|
-->
|
||||||
<configuration>
|
<configuration>
|
||||||
|
<connectionStrings>
|
||||||
|
<add name="BrainWareConnectionString" connectionString="Data Source=LOCALHOST;Initial Catalog=BrainWare;Integrated Security=SSPI;Connect Timeout=30;Pooling=true;TrustServerCertificate=False" providerName="System.Data.SqlClient"/>
|
||||||
|
</connectionStrings>
|
||||||
|
|
||||||
<appSettings>
|
<appSettings>
|
||||||
<add key="webpages:Version" value="3.0.0.0"/>
|
<add key="webpages:Version" value="3.0.0.0"/>
|
||||||
<add key="webpages:Enabled" value="false"/>
|
<add key="webpages:Enabled" value="false"/>
|
||||||
<add key="ClientValidationEnabled" value="true"/>
|
<add key="ClientValidationEnabled" value="true"/>
|
||||||
<add key="UnobtrusiveJavaScriptEnabled" value="true"/>
|
<add key="UnobtrusiveJavaScriptEnabled" value="true"/>
|
||||||
</appSettings>
|
</appSettings>
|
||||||
|
<!--
|
||||||
|
For a description of web.config changes see http://go.microsoft.com/fwlink/?LinkId=235367.
|
||||||
|
|
||||||
|
The following attributes can be set on the <httpRuntime> tag.
|
||||||
|
<system.Web>
|
||||||
|
<httpRuntime targetFramework="4.6.1" />
|
||||||
|
</system.Web>
|
||||||
|
-->
|
||||||
<system.web>
|
<system.web>
|
||||||
<compilation debug="true" targetFramework="4.5.2" />
|
<compilation debug="true" targetFramework="4.6.1"/>
|
||||||
<httpRuntime targetFramework="4.5.2"/>
|
<httpRuntime targetFramework="4.5.2"/>
|
||||||
<httpModules>
|
<httpModules>
|
||||||
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web"/>
|
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web"/>
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>Web</RootNamespace>
|
<RootNamespace>Web</RootNamespace>
|
||||||
<AssemblyName>Web</AssemblyName>
|
<AssemblyName>Web</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||||
<MvcBuildViews>false</MvcBuildViews>
|
<MvcBuildViews>false</MvcBuildViews>
|
||||||
<UseIISExpress>true</UseIISExpress>
|
<UseIISExpress>true</UseIISExpress>
|
||||||
<IISExpressSSLPort />
|
<IISExpressSSLPort />
|
||||||
@ -26,6 +26,8 @@
|
|||||||
<NuGetPackageImportStamp>
|
<NuGetPackageImportStamp>
|
||||||
</NuGetPackageImportStamp>
|
</NuGetPackageImportStamp>
|
||||||
<ApplicationInsightsResourceId>/subscriptions/2d4dc7b2-21d7-4398-9fa5-238684687c92/resourcegroups/Default-ApplicationInsights-EastUS/providers/microsoft.insights/components/Web</ApplicationInsightsResourceId>
|
<ApplicationInsightsResourceId>/subscriptions/2d4dc7b2-21d7-4398-9fa5-238684687c92/resourcegroups/Default-ApplicationInsights-EastUS/providers/microsoft.insights/components/Web</ApplicationInsightsResourceId>
|
||||||
|
<TargetFrameworkProfile />
|
||||||
|
<Use64BitIISExpress />
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
@ -80,13 +82,13 @@
|
|||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.Web.DynamicData" />
|
||||||
<Reference Include="System.Web.Entity" />
|
<Reference Include="System.Web.Entity" />
|
||||||
<Reference Include="System.Web.ApplicationServices" />
|
<Reference Include="System.Web.ApplicationServices" />
|
||||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Web.Extensions" />
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
|
||||||
<Reference Include="System.Xml.Linq" />
|
|
||||||
<Reference Include="System.Web" />
|
<Reference Include="System.Web" />
|
||||||
<Reference Include="System.Web.Abstractions" />
|
<Reference Include="System.Web.Abstractions" />
|
||||||
<Reference Include="System.Web.Routing" />
|
<Reference Include="System.Web.Routing" />
|
||||||
@ -140,6 +142,7 @@
|
|||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
|
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
<Reference Include="WebGrease">
|
<Reference Include="WebGrease">
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
<HintPath>..\packages\WebGrease.1.5.2\lib\WebGrease.dll</HintPath>
|
<HintPath>..\packages\WebGrease.1.5.2\lib\WebGrease.dll</HintPath>
|
||||||
|
Loading…
Reference in New Issue
Block a user