diff --git a/API/API.Test/API.Test.csproj b/API/API.Test/API.Test.csproj
new file mode 100644
index 0000000..2c91b18
--- /dev/null
+++ b/API/API.Test/API.Test.csproj
@@ -0,0 +1,77 @@
+
+
+
+
+
+ Debug
+ AnyCPU
+ {84714616-89D7-4A5D-86D8-2DC395530FEB}
+ Library
+ Properties
+ API.Test
+ API.Test
+ v4.6.2
+ 512
+ {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ 15.0
+ $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
+ $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages
+ False
+ UnitTest
+
+
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ ..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll
+
+
+ ..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll
+
+
+ ..\packages\MSTest.TestFramework.1.4.0\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll
+
+
+ ..\packages\MSTest.TestFramework.1.4.0\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
+
+
+
+
+
+
\ No newline at end of file
diff --git a/API/API.Test/App.config b/API/API.Test/App.config
new file mode 100644
index 0000000..2fb423e
--- /dev/null
+++ b/API/API.Test/App.config
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/API/API.Test/Properties/AssemblyInfo.cs b/API/API.Test/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..bafedfa
--- /dev/null
+++ b/API/API.Test/Properties/AssemblyInfo.cs
@@ -0,0 +1,20 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+[assembly: AssemblyTitle("API.Test")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("API.Test")]
+[assembly: AssemblyCopyright("Copyright © 2019")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+[assembly: ComVisible(false)]
+
+[assembly: Guid("84714616-89d7-4a5d-86d8-2dc395530feb")]
+
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/API/API.Test/UnitTest1.cs b/API/API.Test/UnitTest1.cs
new file mode 100644
index 0000000..6872ca9
--- /dev/null
+++ b/API/API.Test/UnitTest1.cs
@@ -0,0 +1,43 @@
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System;
+using System.Data.Entity.Core.EntityClient;
+using System.Data.SqlClient;
+
+namespace API.Test {
+ [TestClass]
+ public class SqlConnectionBuilder {
+ [TestMethod]
+ public void Build() {
+ var serverName = "localhost\\SQLEXPRESS";
+ var databaseName = "wgenerator";
+ var user = "sa";
+ var pass = "sa";
+
+ // Initialize the connection string builder for the
+ // underlying provider.
+ var sqlBuilder =
+ new SqlConnectionStringBuilder {
+
+ // Set the properties for the data source.
+ DataSource = serverName,
+ InitialCatalog = databaseName,
+ IntegratedSecurity = true,
+ UserID= user,
+ Password = pass,
+ };
+
+ // Build the SqlConnection connection string.
+ var providerString = sqlBuilder.ToString();
+
+
+ Console.WriteLine(providerString.ToString());
+
+ using (var conn =
+ new SqlConnection(providerString.ToString())) {
+ conn.Open();
+ Console.WriteLine("Just testing the connection.");
+ conn.Close();
+ }
+ }
+ }
+}
diff --git a/API/API.Test/packages.config b/API/API.Test/packages.config
new file mode 100644
index 0000000..5f49372
--- /dev/null
+++ b/API/API.Test/packages.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/API/API.sln b/API/API.sln
index 47305ab..1dd5c95 100644
--- a/API/API.sln
+++ b/API/API.sln
@@ -5,6 +5,10 @@ VisualStudioVersion = 15.0.28307.489
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "API", "API\API.csproj", "{27056FE2-5A34-44B2-9196-6F19C04F27CC}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "API.Test", "API.Test\API.Test.csproj", "{84714616-89D7-4A5D-86D8-2DC395530FEB}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Backend", "Backend", "{5DD4FA9B-976C-4CDB-9E73-CF3485DBDD72}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -15,10 +19,18 @@ Global
{27056FE2-5A34-44B2-9196-6F19C04F27CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{27056FE2-5A34-44B2-9196-6F19C04F27CC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{27056FE2-5A34-44B2-9196-6F19C04F27CC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {84714616-89D7-4A5D-86D8-2DC395530FEB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {84714616-89D7-4A5D-86D8-2DC395530FEB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {84714616-89D7-4A5D-86D8-2DC395530FEB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {84714616-89D7-4A5D-86D8-2DC395530FEB}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {27056FE2-5A34-44B2-9196-6F19C04F27CC} = {5DD4FA9B-976C-4CDB-9E73-CF3485DBDD72}
+ {84714616-89D7-4A5D-86D8-2DC395530FEB} = {5DD4FA9B-976C-4CDB-9E73-CF3485DBDD72}
+ EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {27650156-7B3F-4C0C-83D3-D13119DE083F}
EndGlobalSection
diff --git a/API/API/API.csproj b/API/API/API.csproj
index 41f149d..f36a8ac 100644
--- a/API/API/API.csproj
+++ b/API/API/API.csproj
@@ -56,7 +56,25 @@
..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll
+
+ ..\packages\Microsoft.AspNet.OData.7.1.0\lib\net45\Microsoft.AspNet.OData.dll
+
+
+ ..\packages\Microsoft.Extensions.DependencyInjection.2.2.0\lib\net461\Microsoft.Extensions.DependencyInjection.dll
+
+
+ ..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll
+
+
+ ..\packages\Microsoft.OData.Core.7.5.4\lib\portable-net45+win8+wpa81\Microsoft.OData.Core.dll
+
+
+ ..\packages\Microsoft.OData.Edm.7.5.4\lib\portable-net45+win8+wpa81\Microsoft.OData.Edm.dll
+
+
+ ..\packages\Microsoft.Spatial.7.5.4\lib\portable-net45+win8+wpa81\Microsoft.Spatial.dll
+
..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll
@@ -66,6 +84,16 @@
..\packages\Microsoft.AspNet.WebApi.Client.5.2.7\lib\net45\System.Net.Http.Formatting.dll
+
+ ..\packages\System.Reflection.4.3.0\lib\net462\System.Reflection.dll
+ True
+ True
+
+
+ ..\packages\System.Runtime.Extensions.4.3.1\lib\net462\System.Runtime.Extensions.dll
+ True
+ True
+
@@ -98,9 +126,9 @@
-
+
-
+
@@ -122,7 +150,9 @@
-
+
+ Designer
+
Web.config
@@ -130,9 +160,7 @@
Web.config
-
-
-
+
diff --git a/API/API/App_Start/Bootstrapper.cs b/API/API/App_Start/Bootstrapper.cs
deleted file mode 100644
index 32eb596..0000000
--- a/API/API/App_Start/Bootstrapper.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-using Autofac;
-using Autofac.Integration.WebApi;
-using System.Reflection;
-using System.Web.Http;
-
-namespace API.App_Start
-{
- ///
- /// https://autofaccn.readthedocs.io/en/latest/integration/webapi.html#quick-start
- ///
- public class Bootstrapper
- {
- public void InitContainer() {
- var config = GlobalConfiguration.Configuration;
- var builder = new ContainerBuilder();
- builder.RegisterApiControllers(Assembly.GetExecutingAssembly());
- builder.RegisterWebApiFilterProvider(config);
- builder.RegisterWebApiModelBinderProvider();
-
- RegisterServices(builder);
-
- var container = builder.Build();
- config.DependencyResolver = new AutofacWebApiDependencyResolver(container);
- }
-
- private void RegisterServices(ContainerBuilder builder) {
- // ... builder.RegisterType