commit
c4b7a01fde
@ -1,7 +1,7 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25420.1
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.29920.165
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{00D1A9C2-B5F0-4AF3-8072-F6C62B433612}") = "ProjectDB", "ProjectDB\ProjectDB.sqlproj", "{58D1E657-AA21-497F-BA9C-634D6DA2D921}"
|
||||
EndProject
|
||||
@ -9,6 +9,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Web", "Web\Web.csproj", "{F
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj", "{6C10F27E-A278-4801-8AC7-929212274D85}"
|
||||
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
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@ -33,4 +38,7 @@ Global
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {F2D2A54A-021F-4976-A139-0364135E456F}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
@ -65,6 +65,7 @@
|
||||
<Build Include="Tables\product.sql" />
|
||||
<Build Include="Tables\order.sql" />
|
||||
<Build Include="Tables\orderproduct.sql" />
|
||||
<Build Include="PopulateDB.sql" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<RefactorLog Include="ProjectDB.refactorlog" />
|
||||
|
19
README.md
19
README.md
@ -19,3 +19,22 @@ Change the AttachDbFile name to the full path of the BrainWare.mdf file (located
|
||||
|
||||
## Original Output Example
|
||||
![page image](output.GIF?raw=true)
|
||||
|
||||
|
||||
## Setup
|
||||
|
||||
### Database Setup
|
||||
- Start SQL Server Management Studio as Administrator
|
||||
- Once connected 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
|
||||
- Update the database connection string in file Web\Infrastructure\Database.cs
|
||||
- Set the project Web, as the start up project
|
||||
- Press F5
|
||||
- Expected 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
|
||||
that apply only to the Test project.
|
||||
@ -23,4 +23,4 @@
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/></startup></configuration>
|
||||
|
@ -11,9 +11,10 @@
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Tests</RootNamespace>
|
||||
<AssemblyName>Tests</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
|
@ -14,12 +14,14 @@ namespace Web.Infrastructure
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
|
||||
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
|
||||
http://go.microsoft.com/fwlink/?LinkId=301879
|
||||
-->
|
||||
<configuration>
|
||||
<connectionStrings>
|
||||
<add name="BrainWareConnectionString" connectionString="" providerName="System.Data.SqlClient"/>
|
||||
</connectionStrings>
|
||||
|
||||
<appSettings>
|
||||
<add key="webpages:Version" value="3.0.0.0"/>
|
||||
<add key="webpages:Enabled" value="false"/>
|
||||
<add key="ClientValidationEnabled" value="true"/>
|
||||
<add key="UnobtrusiveJavaScriptEnabled" value="true"/>
|
||||
</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>
|
||||
<compilation debug="true" targetFramework="4.5.2" />
|
||||
<compilation debug="true" targetFramework="4.6.1"/>
|
||||
<httpRuntime targetFramework="4.5.2"/>
|
||||
<httpModules>
|
||||
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web"/>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Web</RootNamespace>
|
||||
<AssemblyName>Web</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<MvcBuildViews>false</MvcBuildViews>
|
||||
<UseIISExpress>true</UseIISExpress>
|
||||
<IISExpressSSLPort />
|
||||
@ -26,6 +26,8 @@
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
<ApplicationInsightsResourceId>/subscriptions/2d4dc7b2-21d7-4398-9fa5-238684687c92/resourcegroups/Default-ApplicationInsights-EastUS/providers/microsoft.insights/components/Web</ApplicationInsightsResourceId>
|
||||
<TargetFrameworkProfile />
|
||||
<Use64BitIISExpress />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@ -80,13 +82,13 @@
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Web.DynamicData" />
|
||||
<Reference Include="System.Web.Entity" />
|
||||
<Reference Include="System.Web.ApplicationServices" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Web.Extensions" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.Abstractions" />
|
||||
<Reference Include="System.Web.Routing" />
|
||||
@ -140,6 +142,7 @@
|
||||
<Private>True</Private>
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="WebGrease">
|
||||
<Private>True</Private>
|
||||
<HintPath>..\packages\WebGrease.1.5.2\lib\WebGrease.dll</HintPath>
|
||||
|
Loading…
Reference in New Issue
Block a user