From dae675ee6c2506a2f6eb3fd113646fc4602ce9f4 Mon Sep 17 00:00:00 2001 From: marcinzelent Date: Wed, 3 May 2017 19:42:09 +0200 Subject: Recreated Web API. --- ApartmentAdmin | 1 - ApartmentManager/ApartmentManager.sln | 38 +++--- .../HousingWebAPI/App_Start/BundleConfig.cs | 6 +- .../HousingWebAPI/App_Start/FilterConfig.cs | 2 +- .../HousingWebAPI/App_Start/RouteConfig.cs | 2 +- .../HousingWebAPI/App_Start/WebApiConfig.cs | 2 +- .../Areas/HelpPage/ApiDescriptionExtensions.cs | 2 +- .../Areas/HelpPage/App_Start/HelpPageConfig.cs | 4 +- .../Areas/HelpPage/Controllers/HelpController.cs | 6 +- .../Areas/HelpPage/HelpPageAreaRegistration.cs | 2 +- .../HelpPage/HelpPageConfigurationExtensions.cs | 6 +- .../CollectionModelDescription.cs | 2 +- .../ComplexTypeModelDescription.cs | 2 +- .../DictionaryModelDescription.cs | 2 +- .../ModelDescriptions/EnumTypeModelDescription.cs | 2 +- .../ModelDescriptions/EnumValueDescription.cs | 2 +- .../IModelDocumentationProvider.cs | 2 +- .../KeyValuePairModelDescription.cs | 2 +- .../HelpPage/ModelDescriptions/ModelDescription.cs | 2 +- .../ModelDescriptions/ModelDescriptionGenerator.cs | 2 +- .../ModelDescriptions/ModelNameAttribute.cs | 2 +- .../HelpPage/ModelDescriptions/ModelNameHelper.cs | 2 +- .../ModelDescriptions/ParameterAnnotation.cs | 2 +- .../ModelDescriptions/ParameterDescription.cs | 2 +- .../SimpleTypeModelDescription.cs | 2 +- .../Areas/HelpPage/Models/HelpPageApiModel.cs | 4 +- .../SampleGeneration/HelpPageSampleGenerator.cs | 2 +- .../HelpPage/SampleGeneration/HelpPageSampleKey.cs | 2 +- .../Areas/HelpPage/SampleGeneration/ImageSample.cs | 2 +- .../HelpPage/SampleGeneration/InvalidSample.cs | 2 +- .../HelpPage/SampleGeneration/ObjectGenerator.cs | 2 +- .../HelpPage/SampleGeneration/SampleDirection.cs | 2 +- .../Areas/HelpPage/SampleGeneration/TextSample.cs | 2 +- .../Areas/HelpPage/Views/Help/Api.cshtml | 2 +- .../Views/Help/DisplayTemplates/ApiGroup.cshtml | 4 +- .../CollectionModelDescription.cshtml | 2 +- .../ComplexTypeModelDescription.cshtml | 2 +- .../DictionaryModelDescription.cshtml | 2 +- .../EnumTypeModelDescription.cshtml | 2 +- .../Help/DisplayTemplates/HelpPageApiModel.cshtml | 4 +- .../Views/Help/DisplayTemplates/ImageSample.cshtml | 2 +- .../Help/DisplayTemplates/InvalidSample.cshtml | 2 +- .../KeyValuePairModelDescription.cshtml | 2 +- .../DisplayTemplates/ModelDescriptionLink.cshtml | 2 +- .../Views/Help/DisplayTemplates/Parameters.cshtml | 2 +- .../SimpleTypeModelDescription.cshtml | 2 +- .../Views/Help/DisplayTemplates/TextSample.cshtml | 2 +- .../Areas/HelpPage/Views/Help/Index.cshtml | 2 +- .../Areas/HelpPage/Views/Help/ResourceModel.cshtml | 2 +- .../Areas/HelpPage/XmlDocumentationProvider.cs | 4 +- .../Controllers/ApartmentsController.cs | 50 +++---- .../HousingWebAPI/Controllers/DefectsController.cs | 50 +++---- .../HousingWebAPI/Controllers/HomeController.cs | 2 +- .../Controllers/ResidentsController.cs | 52 +++---- .../HousingWebAPI/Controllers/UsersController.cs | 68 ++++++---- .../HousingWebAPI/Controllers/ValuesController.cs | 39 ------ ApartmentManager/HousingWebAPI/Global.asax | 2 +- ApartmentManager/HousingWebAPI/Global.asax.cs | 2 +- .../HousingWebAPI/HousingWebAPI.csproj | 112 ++++++++-------- .../HousingWebAPI/Models/Apartments.cs | 39 ------ .../HousingWebAPI/Models/ApartmentsDataContext.cs | 114 ---------------- ApartmentManager/HousingWebAPI/Models/Defects.cs | 45 ------- .../HousingWebAPI/Models/PastContractOwners.cs | 17 --- ApartmentManager/HousingWebAPI/Models/Residents.cs | 58 -------- ApartmentManager/HousingWebAPI/Models/Users.cs | 38 ------ ApartmentManager/HousingWebAPI/Project_Readme.html | 149 --------------------- .../HousingWebAPI/Properties/AssemblyInfo.cs | 6 +- .../HousingWebAPI/Scripts/_references.js | Bin 600 -> 0 bytes .../HousingWebAPI/Views/Home/Index.cshtml | 8 +- ApartmentManager/HousingWebAPI/Views/Web.config | 2 +- ApartmentManager/HousingWebAPI/Web.Debug.config | 2 +- ApartmentManager/HousingWebAPI/Web.Release.config | 2 +- ApartmentManager/HousingWebAPI/Web.config | 12 +- ApartmentManager/HousingWebAPI/packages.config | 4 +- .../Controllers/PastContractOwnersController.cs | 133 ++++++++++++++++++ ApartmentManager/HousingWebApi/DataModel.cs | 121 +++++++++++++++++ ApartmentManager/HousingWebApi/Models/Apartment.cs | 42 ++++++ ApartmentManager/HousingWebApi/Models/Defect.cs | 46 +++++++ .../HousingWebApi/Models/PastContractOwner.cs | 17 +++ ApartmentManager/HousingWebApi/Models/Resident.cs | 38 ++++++ ApartmentManager/HousingWebApi/Models/User.cs | 59 ++++++++ HousingDatabase.ldf | Bin 8388608 -> 8388608 bytes HousingDatabase.mdf | Bin 8388608 -> 8388608 bytes 83 files changed, 726 insertions(+), 760 deletions(-) delete mode 160000 ApartmentAdmin delete mode 100644 ApartmentManager/HousingWebAPI/Controllers/ValuesController.cs delete mode 100644 ApartmentManager/HousingWebAPI/Models/Apartments.cs delete mode 100644 ApartmentManager/HousingWebAPI/Models/ApartmentsDataContext.cs delete mode 100644 ApartmentManager/HousingWebAPI/Models/Defects.cs delete mode 100644 ApartmentManager/HousingWebAPI/Models/PastContractOwners.cs delete mode 100644 ApartmentManager/HousingWebAPI/Models/Residents.cs delete mode 100644 ApartmentManager/HousingWebAPI/Models/Users.cs delete mode 100644 ApartmentManager/HousingWebAPI/Project_Readme.html delete mode 100644 ApartmentManager/HousingWebAPI/Scripts/_references.js create mode 100644 ApartmentManager/HousingWebApi/Controllers/PastContractOwnersController.cs create mode 100644 ApartmentManager/HousingWebApi/DataModel.cs create mode 100644 ApartmentManager/HousingWebApi/Models/Apartment.cs create mode 100644 ApartmentManager/HousingWebApi/Models/Defect.cs create mode 100644 ApartmentManager/HousingWebApi/Models/PastContractOwner.cs create mode 100644 ApartmentManager/HousingWebApi/Models/Resident.cs create mode 100644 ApartmentManager/HousingWebApi/Models/User.cs diff --git a/ApartmentAdmin b/ApartmentAdmin deleted file mode 160000 index da22548..0000000 --- a/ApartmentAdmin +++ /dev/null @@ -1 +0,0 @@ -Subproject commit da22548164ed3a3a9b89f25b31780c35a89a3b3f diff --git a/ApartmentManager/ApartmentManager.sln b/ApartmentManager/ApartmentManager.sln index 97a72ca..031a632 100644 --- a/ApartmentManager/ApartmentManager.sln +++ b/ApartmentManager/ApartmentManager.sln @@ -1,11 +1,11 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 +# Visual Studio 15 +VisualStudioVersion = 15.0.26403.7 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApartmentManager", "ApartmentManager\ApartmentManager.csproj", "{95401ED6-D03C-417D-8897-81B5454D2426}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HousingWebAPI", "HousingWebAPI\HousingWebAPI.csproj", "{E57E89D2-7DEA-433B-B7D3-CF27D6FDDE47}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HousingWebApi", "HousingWebApi\HousingWebApi.csproj", "{D777744A-9676-4193-BD59-6F30C724C87A}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -39,22 +39,22 @@ Global {95401ED6-D03C-417D-8897-81B5454D2426}.Release|x86.ActiveCfg = Release|x86 {95401ED6-D03C-417D-8897-81B5454D2426}.Release|x86.Build.0 = Release|x86 {95401ED6-D03C-417D-8897-81B5454D2426}.Release|x86.Deploy.0 = Release|x86 - {E57E89D2-7DEA-433B-B7D3-CF27D6FDDE47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E57E89D2-7DEA-433B-B7D3-CF27D6FDDE47}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E57E89D2-7DEA-433B-B7D3-CF27D6FDDE47}.Debug|ARM.ActiveCfg = Debug|Any CPU - {E57E89D2-7DEA-433B-B7D3-CF27D6FDDE47}.Debug|ARM.Build.0 = Debug|Any CPU - {E57E89D2-7DEA-433B-B7D3-CF27D6FDDE47}.Debug|x64.ActiveCfg = Debug|Any CPU - {E57E89D2-7DEA-433B-B7D3-CF27D6FDDE47}.Debug|x64.Build.0 = Debug|Any CPU - {E57E89D2-7DEA-433B-B7D3-CF27D6FDDE47}.Debug|x86.ActiveCfg = Debug|Any CPU - {E57E89D2-7DEA-433B-B7D3-CF27D6FDDE47}.Debug|x86.Build.0 = Debug|Any CPU - {E57E89D2-7DEA-433B-B7D3-CF27D6FDDE47}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E57E89D2-7DEA-433B-B7D3-CF27D6FDDE47}.Release|Any CPU.Build.0 = Release|Any CPU - {E57E89D2-7DEA-433B-B7D3-CF27D6FDDE47}.Release|ARM.ActiveCfg = Release|Any CPU - {E57E89D2-7DEA-433B-B7D3-CF27D6FDDE47}.Release|ARM.Build.0 = Release|Any CPU - {E57E89D2-7DEA-433B-B7D3-CF27D6FDDE47}.Release|x64.ActiveCfg = Release|Any CPU - {E57E89D2-7DEA-433B-B7D3-CF27D6FDDE47}.Release|x64.Build.0 = Release|Any CPU - {E57E89D2-7DEA-433B-B7D3-CF27D6FDDE47}.Release|x86.ActiveCfg = Release|Any CPU - {E57E89D2-7DEA-433B-B7D3-CF27D6FDDE47}.Release|x86.Build.0 = Release|Any CPU + {D777744A-9676-4193-BD59-6F30C724C87A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D777744A-9676-4193-BD59-6F30C724C87A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D777744A-9676-4193-BD59-6F30C724C87A}.Debug|ARM.ActiveCfg = Debug|Any CPU + {D777744A-9676-4193-BD59-6F30C724C87A}.Debug|ARM.Build.0 = Debug|Any CPU + {D777744A-9676-4193-BD59-6F30C724C87A}.Debug|x64.ActiveCfg = Debug|Any CPU + {D777744A-9676-4193-BD59-6F30C724C87A}.Debug|x64.Build.0 = Debug|Any CPU + {D777744A-9676-4193-BD59-6F30C724C87A}.Debug|x86.ActiveCfg = Debug|Any CPU + {D777744A-9676-4193-BD59-6F30C724C87A}.Debug|x86.Build.0 = Debug|Any CPU + {D777744A-9676-4193-BD59-6F30C724C87A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D777744A-9676-4193-BD59-6F30C724C87A}.Release|Any CPU.Build.0 = Release|Any CPU + {D777744A-9676-4193-BD59-6F30C724C87A}.Release|ARM.ActiveCfg = Release|Any CPU + {D777744A-9676-4193-BD59-6F30C724C87A}.Release|ARM.Build.0 = Release|Any CPU + {D777744A-9676-4193-BD59-6F30C724C87A}.Release|x64.ActiveCfg = Release|Any CPU + {D777744A-9676-4193-BD59-6F30C724C87A}.Release|x64.Build.0 = Release|Any CPU + {D777744A-9676-4193-BD59-6F30C724C87A}.Release|x86.ActiveCfg = Release|Any CPU + {D777744A-9676-4193-BD59-6F30C724C87A}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/ApartmentManager/HousingWebAPI/App_Start/BundleConfig.cs b/ApartmentManager/HousingWebAPI/App_Start/BundleConfig.cs index 12902e6..3c08fb2 100644 --- a/ApartmentManager/HousingWebAPI/App_Start/BundleConfig.cs +++ b/ApartmentManager/HousingWebAPI/App_Start/BundleConfig.cs @@ -1,18 +1,18 @@ using System.Web; using System.Web.Optimization; -namespace HousingWebAPI +namespace HousingWebApi { public class BundleConfig { - // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862 + // For more information on bundling, visit https://go.microsoft.com/fwlink/?LinkId=301862 public static void RegisterBundles(BundleCollection bundles) { bundles.Add(new ScriptBundle("~/bundles/jquery").Include( "~/Scripts/jquery-{version}.js")); // Use the development version of Modernizr to develop with and learn from. Then, when you're - // ready for production, use the build tool at http://modernizr.com to pick only the tests you need. + // ready for production, use the build tool at https://modernizr.com to pick only the tests you need. bundles.Add(new ScriptBundle("~/bundles/modernizr").Include( "~/Scripts/modernizr-*")); diff --git a/ApartmentManager/HousingWebAPI/App_Start/FilterConfig.cs b/ApartmentManager/HousingWebAPI/App_Start/FilterConfig.cs index cc37135..0761bdd 100644 --- a/ApartmentManager/HousingWebAPI/App_Start/FilterConfig.cs +++ b/ApartmentManager/HousingWebAPI/App_Start/FilterConfig.cs @@ -1,7 +1,7 @@ using System.Web; using System.Web.Mvc; -namespace HousingWebAPI +namespace HousingWebApi { public class FilterConfig { diff --git a/ApartmentManager/HousingWebAPI/App_Start/RouteConfig.cs b/ApartmentManager/HousingWebAPI/App_Start/RouteConfig.cs index 6440cfb..73807c8 100644 --- a/ApartmentManager/HousingWebAPI/App_Start/RouteConfig.cs +++ b/ApartmentManager/HousingWebAPI/App_Start/RouteConfig.cs @@ -5,7 +5,7 @@ using System.Web; using System.Web.Mvc; using System.Web.Routing; -namespace HousingWebAPI +namespace HousingWebApi { public class RouteConfig { diff --git a/ApartmentManager/HousingWebAPI/App_Start/WebApiConfig.cs b/ApartmentManager/HousingWebAPI/App_Start/WebApiConfig.cs index a49bdaf..54dcdcc 100644 --- a/ApartmentManager/HousingWebAPI/App_Start/WebApiConfig.cs +++ b/ApartmentManager/HousingWebAPI/App_Start/WebApiConfig.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Web.Http; -namespace HousingWebAPI +namespace HousingWebApi { public static class WebApiConfig { diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/ApiDescriptionExtensions.cs b/ApartmentManager/HousingWebAPI/Areas/HelpPage/ApiDescriptionExtensions.cs index 83077cb..e46eff1 100644 --- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/ApiDescriptionExtensions.cs +++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/ApiDescriptionExtensions.cs @@ -3,7 +3,7 @@ using System.Text; using System.Web; using System.Web.Http.Description; -namespace HousingWebAPI.Areas.HelpPage +namespace HousingWebApi.Areas.HelpPage { public static class ApiDescriptionExtensions { diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/App_Start/HelpPageConfig.cs b/ApartmentManager/HousingWebAPI/Areas/HelpPage/App_Start/HelpPageConfig.cs index 7044013..b568bab 100644 --- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/App_Start/HelpPageConfig.cs +++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/App_Start/HelpPageConfig.cs @@ -16,7 +16,7 @@ using System.Web.Http; using System.Web.Http.OData; #endif -namespace HousingWebAPI.Areas.HelpPage +namespace HousingWebApi.Areas.HelpPage { /// /// Use this class to customize the Help Page. @@ -26,7 +26,7 @@ namespace HousingWebAPI.Areas.HelpPage public static class HelpPageConfig { [SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", - MessageId = "HousingWebAPI.Areas.HelpPage.TextSample.#ctor(System.String)", + MessageId = "HousingWebApi.Areas.HelpPage.TextSample.#ctor(System.String)", Justification = "End users may choose to merge this string with existing localized resources.")] [SuppressMessage("Microsoft.Naming", "CA2204:Literals should be spelled correctly", MessageId = "bsonspec", diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/Controllers/HelpController.cs b/ApartmentManager/HousingWebAPI/Areas/HelpPage/Controllers/HelpController.cs index 36674bc..c47338a 100644 --- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/Controllers/HelpController.cs +++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/Controllers/HelpController.cs @@ -1,10 +1,10 @@ using System; using System.Web.Http; using System.Web.Mvc; -using HousingWebAPI.Areas.HelpPage.ModelDescriptions; -using HousingWebAPI.Areas.HelpPage.Models; +using HousingWebApi.Areas.HelpPage.ModelDescriptions; +using HousingWebApi.Areas.HelpPage.Models; -namespace HousingWebAPI.Areas.HelpPage.Controllers +namespace HousingWebApi.Areas.HelpPage.Controllers { /// /// The controller that will handle requests for the help page. diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/HelpPageAreaRegistration.cs b/ApartmentManager/HousingWebAPI/Areas/HelpPage/HelpPageAreaRegistration.cs index a3c0ce1..a513a84 100644 --- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/HelpPageAreaRegistration.cs +++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/HelpPageAreaRegistration.cs @@ -1,7 +1,7 @@ using System.Web.Http; using System.Web.Mvc; -namespace HousingWebAPI.Areas.HelpPage +namespace HousingWebApi.Areas.HelpPage { public class HelpPageAreaRegistration : AreaRegistration { diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/HelpPageConfigurationExtensions.cs b/ApartmentManager/HousingWebAPI/Areas/HelpPage/HelpPageConfigurationExtensions.cs index f384280..29b8681 100644 --- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/HelpPageConfigurationExtensions.cs +++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/HelpPageConfigurationExtensions.cs @@ -11,10 +11,10 @@ using System.Net.Http.Headers; using System.Web.Http; using System.Web.Http.Controllers; using System.Web.Http.Description; -using HousingWebAPI.Areas.HelpPage.ModelDescriptions; -using HousingWebAPI.Areas.HelpPage.Models; +using HousingWebApi.Areas.HelpPage.ModelDescriptions; +using HousingWebApi.Areas.HelpPage.Models; -namespace HousingWebAPI.Areas.HelpPage +namespace HousingWebApi.Areas.HelpPage { public static class HelpPageConfigurationExtensions { diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/CollectionModelDescription.cs b/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/CollectionModelDescription.cs index e8f0753..129a217 100644 --- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/CollectionModelDescription.cs +++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/CollectionModelDescription.cs @@ -1,4 +1,4 @@ -namespace HousingWebAPI.Areas.HelpPage.ModelDescriptions +namespace HousingWebApi.Areas.HelpPage.ModelDescriptions { public class CollectionModelDescription : ModelDescription { diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/ComplexTypeModelDescription.cs b/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/ComplexTypeModelDescription.cs index 4e4c31a..9da4aa0 100644 --- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/ComplexTypeModelDescription.cs +++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/ComplexTypeModelDescription.cs @@ -1,6 +1,6 @@ using System.Collections.ObjectModel; -namespace HousingWebAPI.Areas.HelpPage.ModelDescriptions +namespace HousingWebApi.Areas.HelpPage.ModelDescriptions { public class ComplexTypeModelDescription : ModelDescription { diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/DictionaryModelDescription.cs b/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/DictionaryModelDescription.cs index 4d86e57..1592a36 100644 --- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/DictionaryModelDescription.cs +++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/DictionaryModelDescription.cs @@ -1,4 +1,4 @@ -namespace HousingWebAPI.Areas.HelpPage.ModelDescriptions +namespace HousingWebApi.Areas.HelpPage.ModelDescriptions { public class DictionaryModelDescription : KeyValuePairModelDescription { diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/EnumTypeModelDescription.cs b/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/EnumTypeModelDescription.cs index 9d23179..a744547 100644 --- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/EnumTypeModelDescription.cs +++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/EnumTypeModelDescription.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Collections.ObjectModel; -namespace HousingWebAPI.Areas.HelpPage.ModelDescriptions +namespace HousingWebApi.Areas.HelpPage.ModelDescriptions { public class EnumTypeModelDescription : ModelDescription { diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/EnumValueDescription.cs b/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/EnumValueDescription.cs index 7dbcb25..6345d92 100644 --- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/EnumValueDescription.cs +++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/EnumValueDescription.cs @@ -1,4 +1,4 @@ -namespace HousingWebAPI.Areas.HelpPage.ModelDescriptions +namespace HousingWebApi.Areas.HelpPage.ModelDescriptions { public class EnumValueDescription { diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/IModelDocumentationProvider.cs b/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/IModelDocumentationProvider.cs index 95151dd..b9c6e5c 100644 --- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/IModelDocumentationProvider.cs +++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/IModelDocumentationProvider.cs @@ -1,7 +1,7 @@ using System; using System.Reflection; -namespace HousingWebAPI.Areas.HelpPage.ModelDescriptions +namespace HousingWebApi.Areas.HelpPage.ModelDescriptions { public interface IModelDocumentationProvider { diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/KeyValuePairModelDescription.cs b/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/KeyValuePairModelDescription.cs index 37d227f..46dd88b 100644 --- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/KeyValuePairModelDescription.cs +++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/KeyValuePairModelDescription.cs @@ -1,4 +1,4 @@ -namespace HousingWebAPI.Areas.HelpPage.ModelDescriptions +namespace HousingWebApi.Areas.HelpPage.ModelDescriptions { public class KeyValuePairModelDescription : ModelDescription { diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/ModelDescription.cs b/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/ModelDescription.cs index 6d44857..c452165 100644 --- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/ModelDescription.cs +++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/ModelDescription.cs @@ -1,6 +1,6 @@ using System; -namespace HousingWebAPI.Areas.HelpPage.ModelDescriptions +namespace HousingWebApi.Areas.HelpPage.ModelDescriptions { /// /// Describes a type model. diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/ModelDescriptionGenerator.cs b/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/ModelDescriptionGenerator.cs index c016a31..da19e51 100644 --- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/ModelDescriptionGenerator.cs +++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/ModelDescriptionGenerator.cs @@ -11,7 +11,7 @@ using System.Web.Http.Description; using System.Xml.Serialization; using Newtonsoft.Json; -namespace HousingWebAPI.Areas.HelpPage.ModelDescriptions +namespace HousingWebApi.Areas.HelpPage.ModelDescriptions { /// /// Generates model descriptions for given types. diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/ModelNameAttribute.cs b/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/ModelNameAttribute.cs index 7c20658..27718ed 100644 --- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/ModelNameAttribute.cs +++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/ModelNameAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace HousingWebAPI.Areas.HelpPage.ModelDescriptions +namespace HousingWebApi.Areas.HelpPage.ModelDescriptions { /// /// Use this attribute to change the name of the generated for a type. diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/ModelNameHelper.cs b/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/ModelNameHelper.cs index c5558c6..0b6fe1b 100644 --- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/ModelNameHelper.cs +++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/ModelNameHelper.cs @@ -3,7 +3,7 @@ using System.Globalization; using System.Linq; using System.Reflection; -namespace HousingWebAPI.Areas.HelpPage.ModelDescriptions +namespace HousingWebApi.Areas.HelpPage.ModelDescriptions { internal static class ModelNameHelper { diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/ParameterAnnotation.cs b/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/ParameterAnnotation.cs index 31a726b..7dd708a 100644 --- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/ParameterAnnotation.cs +++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/ParameterAnnotation.cs @@ -1,6 +1,6 @@ using System; -namespace HousingWebAPI.Areas.HelpPage.ModelDescriptions +namespace HousingWebApi.Areas.HelpPage.ModelDescriptions { public class ParameterAnnotation { diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/ParameterDescription.cs b/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/ParameterDescription.cs index 53ea037..b021eb4 100644 --- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/ParameterDescription.cs +++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/ParameterDescription.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Collections.ObjectModel; -namespace HousingWebAPI.Areas.HelpPage.ModelDescriptions +namespace HousingWebApi.Areas.HelpPage.ModelDescriptions { public class ParameterDescription { diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/SimpleTypeModelDescription.cs b/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/SimpleTypeModelDescription.cs index d478205..a1fde3b 100644 --- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/SimpleTypeModelDescription.cs +++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/ModelDescriptions/SimpleTypeModelDescription.cs @@ -1,4 +1,4 @@ -namespace HousingWebAPI.Areas.HelpPage.ModelDescriptions +namespace HousingWebApi.Areas.HelpPage.ModelDescriptions { public class SimpleTypeModelDescription : ModelDescription { diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/Models/HelpPageApiModel.cs b/ApartmentManager/HousingWebAPI/Areas/HelpPage/Models/HelpPageApiModel.cs index bb1e03a..25b512f 100644 --- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/Models/HelpPageApiModel.cs +++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/Models/HelpPageApiModel.cs @@ -2,9 +2,9 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Net.Http.Headers; using System.Web.Http.Description; -using HousingWebAPI.Areas.HelpPage.ModelDescriptions; +using HousingWebApi.Areas.HelpPage.ModelDescriptions; -namespace HousingWebAPI.Areas.HelpPage.Models +namespace HousingWebApi.Areas.HelpPage.Models { /// /// The model that represents an API displayed on the help page. diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/SampleGeneration/HelpPageSampleGenerator.cs b/ApartmentManager/HousingWebAPI/Areas/HelpPage/SampleGeneration/HelpPageSampleGenerator.cs index 99754e9..8fc7aaa 100644 --- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/SampleGeneration/HelpPageSampleGenerator.cs +++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/SampleGeneration/HelpPageSampleGenerator.cs @@ -13,7 +13,7 @@ using System.Web.Http.Description; using System.Xml.Linq; using Newtonsoft.Json; -namespace HousingWebAPI.Areas.HelpPage +namespace HousingWebApi.Areas.HelpPage { /// /// This class will generate the samples for the help page. diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/SampleGeneration/HelpPageSampleKey.cs b/ApartmentManager/HousingWebAPI/Areas/HelpPage/SampleGeneration/HelpPageSampleKey.cs index ac2afc0..769101a 100644 --- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/SampleGeneration/HelpPageSampleKey.cs +++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/SampleGeneration/HelpPageSampleKey.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Net.Http.Headers; -namespace HousingWebAPI.Areas.HelpPage +namespace HousingWebApi.Areas.HelpPage { /// /// This is used to identify the place where the sample should be applied. diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/SampleGeneration/ImageSample.cs b/ApartmentManager/HousingWebAPI/Areas/HelpPage/SampleGeneration/ImageSample.cs index 8b10fbe..25e5452 100644 --- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/SampleGeneration/ImageSample.cs +++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/SampleGeneration/ImageSample.cs @@ -1,6 +1,6 @@ using System; -namespace HousingWebAPI.Areas.HelpPage +namespace HousingWebApi.Areas.HelpPage { /// /// This represents an image sample on the help page. There's a display template named ImageSample associated with this class. diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/SampleGeneration/InvalidSample.cs b/ApartmentManager/HousingWebAPI/Areas/HelpPage/SampleGeneration/InvalidSample.cs index 4b98400..46b70a7 100644 --- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/SampleGeneration/InvalidSample.cs +++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/SampleGeneration/InvalidSample.cs @@ -1,6 +1,6 @@ using System; -namespace HousingWebAPI.Areas.HelpPage +namespace HousingWebApi.Areas.HelpPage { /// /// This represents an invalid sample on the help page. There's a display template named InvalidSample associated with this class. diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/SampleGeneration/ObjectGenerator.cs b/ApartmentManager/HousingWebAPI/Areas/HelpPage/SampleGeneration/ObjectGenerator.cs index 434d824..9a34023 100644 --- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/SampleGeneration/ObjectGenerator.cs +++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/SampleGeneration/ObjectGenerator.cs @@ -6,7 +6,7 @@ using System.Globalization; using System.Linq; using System.Reflection; -namespace HousingWebAPI.Areas.HelpPage +namespace HousingWebApi.Areas.HelpPage { /// /// This class will create an object of a given type and populate it with sample data. diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/SampleGeneration/SampleDirection.cs b/ApartmentManager/HousingWebAPI/Areas/HelpPage/SampleGeneration/SampleDirection.cs index 15ab134..4538b28 100644 --- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/SampleGeneration/SampleDirection.cs +++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/SampleGeneration/SampleDirection.cs @@ -1,4 +1,4 @@ -namespace HousingWebAPI.Areas.HelpPage +namespace HousingWebApi.Areas.HelpPage { /// /// Indicates whether the sample is used for request or response diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/SampleGeneration/TextSample.cs b/ApartmentManager/HousingWebAPI/Areas/HelpPage/SampleGeneration/TextSample.cs index 0e9d959..26c0e99 100644 --- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/SampleGeneration/TextSample.cs +++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/SampleGeneration/TextSample.cs @@ -1,6 +1,6 @@ using System; -namespace HousingWebAPI.Areas.HelpPage +namespace HousingWebApi.Areas.HelpPage { /// /// This represents a preformatted text sample on the help page. There's a display template named TextSample associated with this class. diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/Api.cshtml b/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/Api.cshtml index 3faf514..54de52c 100644 --- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/Api.cshtml +++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/Api.cshtml @@ -1,5 +1,5 @@ @using System.Web.Http -@using HousingWebAPI.Areas.HelpPage.Models +@using HousingWebApi.Areas.HelpPage.Models @model HelpPageApiModel @{ diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/ApiGroup.cshtml b/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/ApiGroup.cshtml index 7a012da..8be198c 100644 --- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/ApiGroup.cshtml +++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/ApiGroup.cshtml @@ -1,8 +1,8 @@ @using System.Web.Http @using System.Web.Http.Controllers @using System.Web.Http.Description -@using HousingWebAPI.Areas.HelpPage -@using HousingWebAPI.Areas.HelpPage.Models +@using HousingWebApi.Areas.HelpPage +@using HousingWebApi.Areas.HelpPage.Models @model IGrouping @{ diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/CollectionModelDescription.cshtml b/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/CollectionModelDescription.cshtml index 74b111d..9f4b62c 100644 --- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/CollectionModelDescription.cshtml +++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/CollectionModelDescription.cshtml @@ -1,4 +1,4 @@ -@using HousingWebAPI.Areas.HelpPage.ModelDescriptions +@using HousingWebApi.Areas.HelpPage.ModelDescriptions @model CollectionModelDescription @if (Model.ElementDescription is ComplexTypeModelDescription) { diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/ComplexTypeModelDescription.cshtml b/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/ComplexTypeModelDescription.cshtml index bb7e331..5963685 100644 --- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/ComplexTypeModelDescription.cshtml +++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/ComplexTypeModelDescription.cshtml @@ -1,3 +1,3 @@ -@using HousingWebAPI.Areas.HelpPage.ModelDescriptions +@using HousingWebApi.Areas.HelpPage.ModelDescriptions @model ComplexTypeModelDescription @Html.DisplayFor(m => m.Properties, "Parameters") \ No newline at end of file diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/DictionaryModelDescription.cshtml b/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/DictionaryModelDescription.cshtml index 9e501fb..9fe64f8 100644 --- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/DictionaryModelDescription.cshtml +++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/DictionaryModelDescription.cshtml @@ -1,4 +1,4 @@ -@using HousingWebAPI.Areas.HelpPage.ModelDescriptions +@using HousingWebApi.Areas.HelpPage.ModelDescriptions @model DictionaryModelDescription Dictionary of @Html.DisplayFor(m => Model.KeyModelDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.KeyModelDescription }) [key] and @Html.DisplayFor(m => Model.ValueModelDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.ValueModelDescription }) [value] \ No newline at end of file diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/EnumTypeModelDescription.cshtml b/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/EnumTypeModelDescription.cshtml index 268f15b..69cb12d 100644 --- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/EnumTypeModelDescription.cshtml +++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/EnumTypeModelDescription.cshtml @@ -1,4 +1,4 @@ -@using HousingWebAPI.Areas.HelpPage.ModelDescriptions +@using HousingWebApi.Areas.HelpPage.ModelDescriptions @model EnumTypeModelDescription

Possible enumeration values:

diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/HelpPageApiModel.cshtml b/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/HelpPageApiModel.cshtml index b3228ee..e107cae 100644 --- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/HelpPageApiModel.cshtml +++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/HelpPageApiModel.cshtml @@ -1,7 +1,7 @@ @using System.Web.Http @using System.Web.Http.Description -@using HousingWebAPI.Areas.HelpPage.Models -@using HousingWebAPI.Areas.HelpPage.ModelDescriptions +@using HousingWebApi.Areas.HelpPage.Models +@using HousingWebApi.Areas.HelpPage.ModelDescriptions @model HelpPageApiModel @{ diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/ImageSample.cshtml b/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/ImageSample.cshtml index 050d97a..4b0144a 100644 --- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/ImageSample.cshtml +++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/ImageSample.cshtml @@ -1,4 +1,4 @@ -@using HousingWebAPI.Areas.HelpPage +@using HousingWebApi.Areas.HelpPage @model ImageSample \ No newline at end of file diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/InvalidSample.cshtml b/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/InvalidSample.cshtml index e144ff6..9967e5f 100644 --- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/InvalidSample.cshtml +++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/InvalidSample.cshtml @@ -1,4 +1,4 @@ -@using HousingWebAPI.Areas.HelpPage +@using HousingWebApi.Areas.HelpPage @model InvalidSample @if (HttpContext.Current.IsDebuggingEnabled) diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/KeyValuePairModelDescription.cshtml b/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/KeyValuePairModelDescription.cshtml index 669e994..91e9cff 100644 --- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/KeyValuePairModelDescription.cshtml +++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/KeyValuePairModelDescription.cshtml @@ -1,4 +1,4 @@ -@using HousingWebAPI.Areas.HelpPage.ModelDescriptions +@using HousingWebApi.Areas.HelpPage.ModelDescriptions @model KeyValuePairModelDescription Pair of @Html.DisplayFor(m => Model.KeyModelDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.KeyModelDescription }) [key] and @Html.DisplayFor(m => Model.ValueModelDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.ValueModelDescription }) [value] \ No newline at end of file diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/ModelDescriptionLink.cshtml b/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/ModelDescriptionLink.cshtml index f183f22..13c8ccc 100644 --- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/ModelDescriptionLink.cshtml +++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/ModelDescriptionLink.cshtml @@ -1,4 +1,4 @@ -@using HousingWebAPI.Areas.HelpPage.ModelDescriptions +@using HousingWebApi.Areas.HelpPage.ModelDescriptions @model Type @{ ModelDescription modelDescription = ViewBag.modelDescription; diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/Parameters.cshtml b/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/Parameters.cshtml index 6d633e9..045a4e4 100644 --- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/Parameters.cshtml +++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/Parameters.cshtml @@ -2,7 +2,7 @@ @using System.Collections.ObjectModel @using System.Web.Http.Description @using System.Threading -@using HousingWebAPI.Areas.HelpPage.ModelDescriptions +@using HousingWebApi.Areas.HelpPage.ModelDescriptions @model IList @if (Model.Count > 0) diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/SimpleTypeModelDescription.cshtml b/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/SimpleTypeModelDescription.cshtml index edc2351..4433658 100644 --- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/SimpleTypeModelDescription.cshtml +++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/SimpleTypeModelDescription.cshtml @@ -1,3 +1,3 @@ -@using HousingWebAPI.Areas.HelpPage.ModelDescriptions +@using HousingWebApi.Areas.HelpPage.ModelDescriptions @model SimpleTypeModelDescription @Model.Documentation \ No newline at end of file diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/TextSample.cshtml b/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/TextSample.cshtml index 8ff414b..f47154f 100644 --- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/TextSample.cshtml +++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/TextSample.cshtml @@ -1,4 +1,4 @@ -@using HousingWebAPI.Areas.HelpPage +@using HousingWebApi.Areas.HelpPage @model TextSample
diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/Index.cshtml b/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/Index.cshtml
index 0becc96..51eb9c0 100644
--- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/Index.cshtml
+++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/Index.cshtml
@@ -2,7 +2,7 @@
 @using System.Web.Http.Controllers
 @using System.Web.Http.Description
 @using System.Collections.ObjectModel
-@using HousingWebAPI.Areas.HelpPage.Models
+@using HousingWebApi.Areas.HelpPage.Models
 @model Collection
 
 @{
diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/ResourceModel.cshtml b/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/ResourceModel.cshtml
index 702a2c3..db20b87 100644
--- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/ResourceModel.cshtml
+++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/Views/Help/ResourceModel.cshtml
@@ -1,5 +1,5 @@
 @using System.Web.Http
-@using HousingWebAPI.Areas.HelpPage.ModelDescriptions
+@using HousingWebApi.Areas.HelpPage.ModelDescriptions
 @model ModelDescription
 
 
diff --git a/ApartmentManager/HousingWebAPI/Areas/HelpPage/XmlDocumentationProvider.cs b/ApartmentManager/HousingWebAPI/Areas/HelpPage/XmlDocumentationProvider.cs
index 0eeefb9..b7a347c 100644
--- a/ApartmentManager/HousingWebAPI/Areas/HelpPage/XmlDocumentationProvider.cs
+++ b/ApartmentManager/HousingWebAPI/Areas/HelpPage/XmlDocumentationProvider.cs
@@ -5,9 +5,9 @@ using System.Reflection;
 using System.Web.Http.Controllers;
 using System.Web.Http.Description;
 using System.Xml.XPath;
-using HousingWebAPI.Areas.HelpPage.ModelDescriptions;
+using HousingWebApi.Areas.HelpPage.ModelDescriptions;
 
-namespace HousingWebAPI.Areas.HelpPage
+namespace HousingWebApi.Areas.HelpPage
 {
     /// 
     /// A custom  that reads the API documentation from an XML documentation file.
diff --git a/ApartmentManager/HousingWebAPI/Controllers/ApartmentsController.cs b/ApartmentManager/HousingWebAPI/Controllers/ApartmentsController.cs
index d567555..a3de905 100644
--- a/ApartmentManager/HousingWebAPI/Controllers/ApartmentsController.cs
+++ b/ApartmentManager/HousingWebAPI/Controllers/ApartmentsController.cs
@@ -8,48 +8,48 @@ using System.Net;
 using System.Net.Http;
 using System.Web.Http;
 using System.Web.Http.Description;
-using HousingWebAPI.Models;
+using HousingWebApi;
 
-namespace HousingWebAPI.Controllers
+namespace HousingWebApi.Controllers
 {
     public class ApartmentsController : ApiController
     {
-        private ApartmentsDataContext db = new ApartmentsDataContext();
+        private DataModel db = new DataModel();
 
         // GET: api/Apartments
-        public IQueryable GetApartments()
+        public IQueryable GetApartments()
         {
             return db.Apartments;
         }
 
         // GET: api/Apartments/5
-        [ResponseType(typeof(Apartments))]
-        public IHttpActionResult GetApartments(int id)
+        [ResponseType(typeof(Apartment))]
+        public IHttpActionResult GetApartment(int id)
         {
-            Apartments apartments = db.Apartments.Find(id);
-            if (apartments == null)
+            Apartment apartment = db.Apartments.Find(id);
+            if (apartment == null)
             {
                 return NotFound();
             }
 
-            return Ok(apartments);
+            return Ok(apartment);
         }
 
         // PUT: api/Apartments/5
         [ResponseType(typeof(void))]
-        public IHttpActionResult PutApartments(int id, Apartments apartments)
+        public IHttpActionResult PutApartment(int id, Apartment apartment)
         {
             if (!ModelState.IsValid)
             {
                 return BadRequest(ModelState);
             }
 
-            if (id != apartments.ApartmentNumber)
+            if (id != apartment.ApartmentNumber)
             {
                 return BadRequest();
             }
 
-            db.Entry(apartments).State = EntityState.Modified;
+            db.Entry(apartment).State = EntityState.Modified;
 
             try
             {
@@ -57,7 +57,7 @@ namespace HousingWebAPI.Controllers
             }
             catch (DbUpdateConcurrencyException)
             {
-                if (!ApartmentsExists(id))
+                if (!ApartmentExists(id))
                 {
                     return NotFound();
                 }
@@ -71,15 +71,15 @@ namespace HousingWebAPI.Controllers
         }
 
         // POST: api/Apartments
-        [ResponseType(typeof(Apartments))]
-        public IHttpActionResult PostApartments(Apartments apartments)
+        [ResponseType(typeof(Apartment))]
+        public IHttpActionResult PostApartment(Apartment apartment)
         {
             if (!ModelState.IsValid)
             {
                 return BadRequest(ModelState);
             }
 
-            db.Apartments.Add(apartments);
+            db.Apartments.Add(apartment);
 
             try
             {
@@ -87,7 +87,7 @@ namespace HousingWebAPI.Controllers
             }
             catch (DbUpdateException)
             {
-                if (ApartmentsExists(apartments.ApartmentNumber))
+                if (ApartmentExists(apartment.ApartmentNumber))
                 {
                     return Conflict();
                 }
@@ -97,23 +97,23 @@ namespace HousingWebAPI.Controllers
                 }
             }
 
-            return CreatedAtRoute("DefaultApi", new { id = apartments.ApartmentNumber }, apartments);
+            return CreatedAtRoute("DefaultApi", new { id = apartment.ApartmentNumber }, apartment);
         }
 
         // DELETE: api/Apartments/5
-        [ResponseType(typeof(Apartments))]
-        public IHttpActionResult DeleteApartments(int id)
+        [ResponseType(typeof(Apartment))]
+        public IHttpActionResult DeleteApartment(int id)
         {
-            Apartments apartments = db.Apartments.Find(id);
-            if (apartments == null)
+            Apartment apartment = db.Apartments.Find(id);
+            if (apartment == null)
             {
                 return NotFound();
             }
 
-            db.Apartments.Remove(apartments);
+            db.Apartments.Remove(apartment);
             db.SaveChanges();
 
-            return Ok(apartments);
+            return Ok(apartment);
         }
 
         protected override void Dispose(bool disposing)
@@ -125,7 +125,7 @@ namespace HousingWebAPI.Controllers
             base.Dispose(disposing);
         }
 
-        private bool ApartmentsExists(int id)
+        private bool ApartmentExists(int id)
         {
             return db.Apartments.Count(e => e.ApartmentNumber == id) > 0;
         }
diff --git a/ApartmentManager/HousingWebAPI/Controllers/DefectsController.cs b/ApartmentManager/HousingWebAPI/Controllers/DefectsController.cs
index 9aad195..aa6f519 100644
--- a/ApartmentManager/HousingWebAPI/Controllers/DefectsController.cs
+++ b/ApartmentManager/HousingWebAPI/Controllers/DefectsController.cs
@@ -8,48 +8,48 @@ using System.Net;
 using System.Net.Http;
 using System.Web.Http;
 using System.Web.Http.Description;
-using HousingWebAPI.Models;
+using HousingWebApi;
 
-namespace HousingWebAPI.Controllers
+namespace HousingWebApi.Controllers
 {
     public class DefectsController : ApiController
     {
-        private ApartmentsDataContext db = new ApartmentsDataContext();
+        private DataModel db = new DataModel();
 
         // GET: api/Defects
-        public IQueryable GetDefects()
+        public IQueryable GetDefects()
         {
             return db.Defects;
         }
 
         // GET: api/Defects/5
-        [ResponseType(typeof(Defects))]
-        public IHttpActionResult GetDefects(int id)
+        [ResponseType(typeof(Defect))]
+        public IHttpActionResult GetDefect(int id)
         {
-            Defects defects = db.Defects.Find(id);
-            if (defects == null)
+            Defect defect = db.Defects.Find(id);
+            if (defect == null)
             {
                 return NotFound();
             }
 
-            return Ok(defects);
+            return Ok(defect);
         }
 
         // PUT: api/Defects/5
         [ResponseType(typeof(void))]
-        public IHttpActionResult PutDefects(int id, Defects defects)
+        public IHttpActionResult PutDefect(int id, Defect defect)
         {
             if (!ModelState.IsValid)
             {
                 return BadRequest(ModelState);
             }
 
-            if (id != defects.DefectNumber)
+            if (id != defect.DefectNumber)
             {
                 return BadRequest();
             }
 
-            db.Entry(defects).State = EntityState.Modified;
+            db.Entry(defect).State = EntityState.Modified;
 
             try
             {
@@ -57,7 +57,7 @@ namespace HousingWebAPI.Controllers
             }
             catch (DbUpdateConcurrencyException)
             {
-                if (!DefectsExists(id))
+                if (!DefectExists(id))
                 {
                     return NotFound();
                 }
@@ -71,15 +71,15 @@ namespace HousingWebAPI.Controllers
         }
 
         // POST: api/Defects
-        [ResponseType(typeof(Defects))]
-        public IHttpActionResult PostDefects(Defects defects)
+        [ResponseType(typeof(Defect))]
+        public IHttpActionResult PostDefect(Defect defect)
         {
             if (!ModelState.IsValid)
             {
                 return BadRequest(ModelState);
             }
 
-            db.Defects.Add(defects);
+            db.Defects.Add(defect);
 
             try
             {
@@ -87,7 +87,7 @@ namespace HousingWebAPI.Controllers
             }
             catch (DbUpdateException)
             {
-                if (DefectsExists(defects.DefectNumber))
+                if (DefectExists(defect.DefectNumber))
                 {
                     return Conflict();
                 }
@@ -97,23 +97,23 @@ namespace HousingWebAPI.Controllers
                 }
             }
 
-            return CreatedAtRoute("DefaultApi", new { id = defects.DefectNumber }, defects);
+            return CreatedAtRoute("DefaultApi", new { id = defect.DefectNumber }, defect);
         }
 
         // DELETE: api/Defects/5
-        [ResponseType(typeof(Defects))]
-        public IHttpActionResult DeleteDefects(int id)
+        [ResponseType(typeof(Defect))]
+        public IHttpActionResult DeleteDefect(int id)
         {
-            Defects defects = db.Defects.Find(id);
-            if (defects == null)
+            Defect defect = db.Defects.Find(id);
+            if (defect == null)
             {
                 return NotFound();
             }
 
-            db.Defects.Remove(defects);
+            db.Defects.Remove(defect);
             db.SaveChanges();
 
-            return Ok(defects);
+            return Ok(defect);
         }
 
         protected override void Dispose(bool disposing)
@@ -125,7 +125,7 @@ namespace HousingWebAPI.Controllers
             base.Dispose(disposing);
         }
 
-        private bool DefectsExists(int id)
+        private bool DefectExists(int id)
         {
             return db.Defects.Count(e => e.DefectNumber == id) > 0;
         }
diff --git a/ApartmentManager/HousingWebAPI/Controllers/HomeController.cs b/ApartmentManager/HousingWebAPI/Controllers/HomeController.cs
index e48b8a5..fcd58bd 100644
--- a/ApartmentManager/HousingWebAPI/Controllers/HomeController.cs
+++ b/ApartmentManager/HousingWebAPI/Controllers/HomeController.cs
@@ -4,7 +4,7 @@ using System.Linq;
 using System.Web;
 using System.Web.Mvc;
 
-namespace HousingWebAPI.Controllers
+namespace HousingWebApi.Controllers
 {
     public class HomeController : Controller
     {
diff --git a/ApartmentManager/HousingWebAPI/Controllers/ResidentsController.cs b/ApartmentManager/HousingWebAPI/Controllers/ResidentsController.cs
index 7ebf320..b744392 100644
--- a/ApartmentManager/HousingWebAPI/Controllers/ResidentsController.cs
+++ b/ApartmentManager/HousingWebAPI/Controllers/ResidentsController.cs
@@ -8,48 +8,48 @@ using System.Net;
 using System.Net.Http;
 using System.Web.Http;
 using System.Web.Http.Description;
-using HousingWebAPI.Models;
+using HousingWebApi;
 
-namespace HousingWebAPI.Controllers
+namespace HousingWebApi.Controllers
 {
     public class ResidentsController : ApiController
     {
-        private ApartmentsDataContext db = new ApartmentsDataContext();
+        private DataModel db = new DataModel();
 
         // GET: api/Residents
-        public IQueryable GetResidents()
+        public IQueryable GetResidents()
         {
             return db.Residents;
         }
 
         // GET: api/Residents/5
-        [ResponseType(typeof(Residents))]
-        public IHttpActionResult GetResidents(int id)
+        [ResponseType(typeof(Resident))]
+        public IHttpActionResult GetResident(int id)
         {
-            Residents residents = db.Residents.Find(id);
-            if (residents == null)
+            Resident resident = db.Residents.Find(id);
+            if (resident == null)
             {
                 return NotFound();
             }
 
-            return Ok(residents);
+            return Ok(resident);
         }
 
         // PUT: api/Residents/5
         [ResponseType(typeof(void))]
-        public IHttpActionResult PutResidents(int id, Residents residents)
+        public IHttpActionResult PutResident(int id, Resident resident)
         {
             if (!ModelState.IsValid)
             {
                 return BadRequest(ModelState);
             }
 
-            if (id != residents.ResidentNumber)
+            if (id != resident.ResidentNr)
             {
                 return BadRequest();
             }
 
-            db.Entry(residents).State = EntityState.Modified;
+            db.Entry(resident).State = EntityState.Modified;
 
             try
             {
@@ -57,7 +57,7 @@ namespace HousingWebAPI.Controllers
             }
             catch (DbUpdateConcurrencyException)
             {
-                if (!ResidentsExists(id))
+                if (!ResidentExists(id))
                 {
                     return NotFound();
                 }
@@ -71,15 +71,15 @@ namespace HousingWebAPI.Controllers
         }
 
         // POST: api/Residents
-        [ResponseType(typeof(Residents))]
-        public IHttpActionResult PostResidents(Residents residents)
+        [ResponseType(typeof(Resident))]
+        public IHttpActionResult PostResident(Resident resident)
         {
             if (!ModelState.IsValid)
             {
                 return BadRequest(ModelState);
             }
 
-            db.Residents.Add(residents);
+            db.Residents.Add(resident);
 
             try
             {
@@ -87,7 +87,7 @@ namespace HousingWebAPI.Controllers
             }
             catch (DbUpdateException)
             {
-                if (ResidentsExists(residents.ResidentNumber))
+                if (ResidentExists(resident.ResidentNr))
                 {
                     return Conflict();
                 }
@@ -97,23 +97,23 @@ namespace HousingWebAPI.Controllers
                 }
             }
 
-            return CreatedAtRoute("DefaultApi", new { id = residents.ResidentNumber }, residents);
+            return CreatedAtRoute("DefaultApi", new { id = resident.ResidentNr }, resident);
         }
 
         // DELETE: api/Residents/5
-        [ResponseType(typeof(Residents))]
-        public IHttpActionResult DeleteResidents(int id)
+        [ResponseType(typeof(Resident))]
+        public IHttpActionResult DeleteResident(int id)
         {
-            Residents residents = db.Residents.Find(id);
-            if (residents == null)
+            Resident resident = db.Residents.Find(id);
+            if (resident == null)
             {
                 return NotFound();
             }
 
-            db.Residents.Remove(residents);
+            db.Residents.Remove(resident);
             db.SaveChanges();
 
-            return Ok(residents);
+            return Ok(resident);
         }
 
         protected override void Dispose(bool disposing)
@@ -125,9 +125,9 @@ namespace HousingWebAPI.Controllers
             base.Dispose(disposing);
         }
 
-        private bool ResidentsExists(int id)
+        private bool ResidentExists(int id)
         {
-            return db.Residents.Count(e => e.ResidentNumber == id) > 0;
+            return db.Residents.Count(e => e.ResidentNr == id) > 0;
         }
     }
 }
\ No newline at end of file
diff --git a/ApartmentManager/HousingWebAPI/Controllers/UsersController.cs b/ApartmentManager/HousingWebAPI/Controllers/UsersController.cs
index dbbc31c..af3ac1d 100644
--- a/ApartmentManager/HousingWebAPI/Controllers/UsersController.cs
+++ b/ApartmentManager/HousingWebAPI/Controllers/UsersController.cs
@@ -8,48 +8,62 @@ using System.Net;
 using System.Net.Http;
 using System.Web.Http;
 using System.Web.Http.Description;
-using HousingWebAPI.Models;
+using HousingWebApi;
 
-namespace HousingWebAPI.Controllers
+namespace HousingWebApi.Controllers
 {
     public class UsersController : ApiController
     {
-        private ApartmentsDataContext db = new ApartmentsDataContext();
+        private DataModel db = new DataModel();
 
-        // GET: api/UsersVartotojas
-        public IQueryable GetUsers()
+        // GET: api/Users
+        public IQueryable GetUsers()
         {
             return db.Users;
         }
 
+        // GET: api/Users/by-username/username
+        //[ResponseType(typeof(User))]
+        //[Route("api/Users/by-username/{username:string}")]
+        //public IHttpActionResult GetUserByUsername(string username)
+        //{
+        //    User user = db.Users.Find(username);
+        //    if (user == null)
+        //    {
+        //        return NotFound();
+        //    }
+
+        //    return Ok(user);
+        //}
+
         // GET: api/Users/5
-        [ResponseType(typeof(Users))]
-        public IHttpActionResult GetUsers(int id)
+        [ResponseType(typeof(User))]
+        public IHttpActionResult GetUser(int id)
         {
-            Users users = db.Users.Find(id);
-            if (users == null)
+            User user = db.Users.Find(id);
+            if (user == null)
             {
                 return NotFound();
             }
 
-            return Ok(users);
+            return Ok(user);
         }
 
         // PUT: api/Users/5
         [ResponseType(typeof(void))]
-        public IHttpActionResult PutUsers(int id, Users users)
+        public IHttpActionResult PutUser(int id, User user)
         {
             if (!ModelState.IsValid)
             {
                 return BadRequest(ModelState);
             }
 
-            if (id != users.ResidentNumber)
+            if (id != user.ApartmentNr)
             {
                 return BadRequest();
             }
 
-            db.Entry(users).State = EntityState.Modified;
+            db.Entry(user).State = EntityState.Modified;
 
             try
             {
@@ -57,7 +71,7 @@ namespace HousingWebAPI.Controllers
             }
             catch (DbUpdateConcurrencyException)
             {
-                if (!UsersExists(id))
+                if (!UserExists(id))
                 {
                     return NotFound();
                 }
@@ -71,15 +85,15 @@ namespace HousingWebAPI.Controllers
         }
 
         // POST: api/Users
-        [ResponseType(typeof(Users))]
-        public IHttpActionResult PostUsers(Users users)
+        [ResponseType(typeof(User))]
+        public IHttpActionResult PostUser(User user)
         {
             if (!ModelState.IsValid)
             {
                 return BadRequest(ModelState);
             }
 
-            db.Users.Add(users);
+            db.Users.Add(user);
 
             try
             {
@@ -87,7 +101,7 @@ namespace HousingWebAPI.Controllers
             }
             catch (DbUpdateException)
             {
-                if (UsersExists(users.ResidentNumber))
+                if (UserExists(user.ApartmentNr))
                 {
                     return Conflict();
                 }
@@ -97,23 +111,23 @@ namespace HousingWebAPI.Controllers
                 }
             }
 
-            return CreatedAtRoute("DefaultApi", new { id = users.ResidentNumber }, users);
+            return CreatedAtRoute("DefaultApi", new { id = user.ApartmentNr }, user);
         }
 
         // DELETE: api/Users/5
-        [ResponseType(typeof(Users))]
-        public IHttpActionResult DeleteUsers(int id)
+        [ResponseType(typeof(User))]
+        public IHttpActionResult DeleteUser(int id)
         {
-            Users users = db.Users.Find(id);
-            if (users == null)
+            User user = db.Users.Find(id);
+            if (user == null)
             {
                 return NotFound();
             }
 
-            db.Users.Remove(users);
+            db.Users.Remove(user);
             db.SaveChanges();
 
-            return Ok(users);
+            return Ok(user);
         }
 
         protected override void Dispose(bool disposing)
@@ -125,9 +139,9 @@ namespace HousingWebAPI.Controllers
             base.Dispose(disposing);
         }
 
-        private bool UsersExists(int id)
+        private bool UserExists(int id)
         {
-            return db.Users.Count(e => e.ResidentNumber == id) > 0;
+            return db.Users.Count(e => e.ApartmentNr == id) > 0;
         }
     }
 }
\ No newline at end of file
diff --git a/ApartmentManager/HousingWebAPI/Controllers/ValuesController.cs b/ApartmentManager/HousingWebAPI/Controllers/ValuesController.cs
deleted file mode 100644
index 42e196f..0000000
--- a/ApartmentManager/HousingWebAPI/Controllers/ValuesController.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Net;
-using System.Net.Http;
-using System.Web.Http;
-
-namespace HousingWebAPI.Controllers
-{
-    public class ValuesController : ApiController
-    {
-        // GET api/values
-        public IEnumerable Get()
-        {
-            return new string[] { "value1", "value2" };
-        }
-
-        // GET api/values/5
-        public string Get(int id)
-        {
-            return "value";
-        }
-
-        // POST api/values
-        public void Post([FromBody]string value)
-        {
-        }
-
-        // PUT api/values/5
-        public void Put(int id, [FromBody]string value)
-        {
-        }
-
-        // DELETE api/values/5
-        public void Delete(int id)
-        {
-        }
-    }
-}
diff --git a/ApartmentManager/HousingWebAPI/Global.asax b/ApartmentManager/HousingWebAPI/Global.asax
index 9cbf668..7fe6e48 100644
--- a/ApartmentManager/HousingWebAPI/Global.asax
+++ b/ApartmentManager/HousingWebAPI/Global.asax
@@ -1 +1 @@
-<%@ Application Codebehind="Global.asax.cs" Inherits="HousingWebAPI.WebApiApplication" Language="C#" %>
+<%@ Application Codebehind="Global.asax.cs" Inherits="HousingWebApi.WebApiApplication" Language="C#" %>
diff --git a/ApartmentManager/HousingWebAPI/Global.asax.cs b/ApartmentManager/HousingWebAPI/Global.asax.cs
index 597224d..a431bc7 100644
--- a/ApartmentManager/HousingWebAPI/Global.asax.cs
+++ b/ApartmentManager/HousingWebAPI/Global.asax.cs
@@ -7,7 +7,7 @@ using System.Web.Mvc;
 using System.Web.Optimization;
 using System.Web.Routing;
 
-namespace HousingWebAPI
+namespace HousingWebApi
 {
     public class WebApiApplication : System.Web.HttpApplication
     {
diff --git a/ApartmentManager/HousingWebAPI/HousingWebAPI.csproj b/ApartmentManager/HousingWebAPI/HousingWebAPI.csproj
index 29ab1ec..462519c 100644
--- a/ApartmentManager/HousingWebAPI/HousingWebAPI.csproj
+++ b/ApartmentManager/HousingWebAPI/HousingWebAPI.csproj
@@ -1,7 +1,7 @@
 
-
-  
-  
+
+  
+  
   
   
     Debug
@@ -9,12 +9,12 @@
     
     
     2.0
-    {E57E89D2-7DEA-433B-B7D3-CF27D6FDDE47}
+    {D777744A-9676-4193-BD59-6F30C724C87A}
     {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
     Library
     Properties
-    HousingWebAPI
-    HousingWebAPI
+    HousingWebApi
+    HousingWebApi
     v4.5.2
     false
     true
@@ -36,6 +36,7 @@
     4
   
   
+    true
     pdbonly
     true
     bin\
@@ -46,43 +47,12 @@
   
     
       ..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll
-      True
     
     
       ..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.SqlServer.dll
-      True
-    
-    
-      ..\packages\Microsoft.ApplicationInsights.Agent.Intercept.2.0.6\lib\net45\Microsoft.AI.Agent.Intercept.dll
-      True
-    
-    
-      ..\packages\Microsoft.ApplicationInsights.DependencyCollector.2.2.0\lib\net45\Microsoft.AI.DependencyCollector.dll
-      True
-    
-    
-      ..\packages\Microsoft.ApplicationInsights.PerfCounterCollector.2.2.0\lib\net45\Microsoft.AI.PerfCounterCollector.dll
-      True
-    
-    
-      ..\packages\Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.2.2.0\lib\net45\Microsoft.AI.ServerTelemetryChannel.dll
-      True
     
-    
-      ..\packages\Microsoft.ApplicationInsights.Web.2.2.0\lib\net45\Microsoft.AI.Web.dll
-      True
-    
-    
-      ..\packages\Microsoft.ApplicationInsights.WindowsServer.2.2.0\lib\net45\Microsoft.AI.WindowsServer.dll
-      True
-    
-    
-      ..\packages\Microsoft.ApplicationInsights.2.2.0\lib\net45\Microsoft.ApplicationInsights.dll
-      True
-    
-    
-      ..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll
-      True
+    
+      ..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.3\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll
     
     
     
@@ -158,9 +128,35 @@
     
   
   
-    
+    
+      ..\packages\Microsoft.ApplicationInsights.2.2.0\lib\net45\Microsoft.ApplicationInsights.dll
+    
+    
+      ..\packages\Microsoft.ApplicationInsights.Agent.Intercept.2.0.6\lib\net45\Microsoft.AI.Agent.Intercept.dll
+    
+    
+      ..\packages\Microsoft.ApplicationInsights.DependencyCollector.2.2.0\lib\net45\Microsoft.AI.DependencyCollector.dll
+    
+    
+      ..\packages\Microsoft.ApplicationInsights.PerfCounterCollector.2.2.0\lib\net45\Microsoft.AI.PerfCounterCollector.dll
+    
+    
+      ..\packages\Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.2.2.0\lib\net45\Microsoft.AI.ServerTelemetryChannel.dll
+    
+    
+      ..\packages\Microsoft.ApplicationInsights.WindowsServer.2.2.0\lib\net45\Microsoft.AI.WindowsServer.dll
+    
+    
+      ..\packages\Microsoft.ApplicationInsights.Web.2.2.0\lib\net45\Microsoft.AI.Web.dll
+    
   
   
+    
+    
+    
+    
+    
+    
     
     
     
@@ -193,22 +189,16 @@
     
     
     
-    
-    
     
-    
-    
-    
+    
+    
     
       Global.asax
     
-    
-    
-    
-    
-    
-    
+    
     
+    
+    
   
   
     
@@ -256,20 +246,28 @@
     
     
     
-    
     
     
     
     
     
   
-  
+  
+    
+  
   
     
+  
+  
     
+  
+  
     
+  
+  
     
-    
+  
+  
     
   
   
@@ -288,7 +286,7 @@
         
           True
           True
-          60916
+          58478
           /
           http://localhost:60916/
           False
@@ -304,8 +302,8 @@
     
       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}.
     
-    
-    
+    
+    
   
   
+
 
 
   
+
 
 
   
 
   
@@ -64,8 +64,8 @@
   
   
     
-      
-      
+      
+      
     
   
   
@@ -79,8 +79,6 @@
     
   
   
-    
-    
-    
-  
+    
+  
 
\ No newline at end of file
diff --git a/ApartmentManager/HousingWebAPI/packages.config b/ApartmentManager/HousingWebAPI/packages.config
index 12642ae..556b5f7 100644
--- a/ApartmentManager/HousingWebAPI/packages.config
+++ b/ApartmentManager/HousingWebAPI/packages.config
@@ -20,8 +20,8 @@
   
   
   
-  
-  
+  
+  
   
   
   
diff --git a/ApartmentManager/HousingWebApi/Controllers/PastContractOwnersController.cs b/ApartmentManager/HousingWebApi/Controllers/PastContractOwnersController.cs
new file mode 100644
index 0000000..d1f3e00
--- /dev/null
+++ b/ApartmentManager/HousingWebApi/Controllers/PastContractOwnersController.cs
@@ -0,0 +1,133 @@
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.Entity;
+using System.Data.Entity.Infrastructure;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Web.Http;
+using System.Web.Http.Description;
+using HousingWebApi;
+
+namespace HousingWebApi.Controllers
+{
+    public class PastContractOwnersController : ApiController
+    {
+        private DataModel db = new DataModel();
+
+        // GET: api/PastContractOwners
+        public IQueryable GetPastContractOwners()
+        {
+            return db.PastContractOwners;
+        }
+
+        // GET: api/PastContractOwners/5
+        [ResponseType(typeof(PastContractOwner))]
+        public IHttpActionResult GetPastContractOwner(int id)
+        {
+            PastContractOwner pastContractOwner = db.PastContractOwners.Find(id);
+            if (pastContractOwner == null)
+            {
+                return NotFound();
+            }
+
+            return Ok(pastContractOwner);
+        }
+
+        // PUT: api/PastContractOwners/5
+        [ResponseType(typeof(void))]
+        public IHttpActionResult PutPastContractOwner(int id, PastContractOwner pastContractOwner)
+        {
+            if (!ModelState.IsValid)
+            {
+                return BadRequest(ModelState);
+            }
+
+            if (id != pastContractOwner.Id)
+            {
+                return BadRequest();
+            }
+
+            db.Entry(pastContractOwner).State = EntityState.Modified;
+
+            try
+            {
+                db.SaveChanges();
+            }
+            catch (DbUpdateConcurrencyException)
+            {
+                if (!PastContractOwnerExists(id))
+                {
+                    return NotFound();
+                }
+                else
+                {
+                    throw;
+                }
+            }
+
+            return StatusCode(HttpStatusCode.NoContent);
+        }
+
+        // POST: api/PastContractOwners
+        [ResponseType(typeof(PastContractOwner))]
+        public IHttpActionResult PostPastContractOwner(PastContractOwner pastContractOwner)
+        {
+            if (!ModelState.IsValid)
+            {
+                return BadRequest(ModelState);
+            }
+
+            db.PastContractOwners.Add(pastContractOwner);
+
+            try
+            {
+                db.SaveChanges();
+            }
+            catch (DbUpdateException)
+            {
+                if (PastContractOwnerExists(pastContractOwner.Id))
+                {
+                    return Conflict();
+                }
+                else
+                {
+                    throw;
+                }
+            }
+
+            return CreatedAtRoute("DefaultApi", new { id = pastContractOwner.Id }, pastContractOwner);
+        }
+
+        // DELETE: api/PastContractOwners/5
+        [ResponseType(typeof(PastContractOwner))]
+        public IHttpActionResult DeletePastContractOwner(int id)
+        {
+            PastContractOwner pastContractOwner = db.PastContractOwners.Find(id);
+            if (pastContractOwner == null)
+            {
+                return NotFound();
+            }
+
+            db.PastContractOwners.Remove(pastContractOwner);
+            db.SaveChanges();
+
+            return Ok(pastContractOwner);
+        }
+
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing)
+            {
+                db.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        private bool PastContractOwnerExists(int id)
+        {
+            return db.PastContractOwners.Count(e => e.Id == id) > 0;
+        }
+    }
+}
\ No newline at end of file
diff --git a/ApartmentManager/HousingWebApi/DataModel.cs b/ApartmentManager/HousingWebApi/DataModel.cs
new file mode 100644
index 0000000..b4e7556
--- /dev/null
+++ b/ApartmentManager/HousingWebApi/DataModel.cs
@@ -0,0 +1,121 @@
+namespace HousingWebApi
+{
+    using System;
+    using System.Data.Entity;
+    using System.ComponentModel.DataAnnotations.Schema;
+    using System.Linq;
+
+    public partial class DataModel : DbContext
+    {
+        public DataModel()
+            : base("name=DataModel")
+        {
+            base.Configuration.ProxyCreationEnabled = false;
+        }
+
+        public virtual DbSet Apartments { get; set; }
+        public virtual DbSet Defects { get; set; }
+        public virtual DbSet PastContractOwners { get; set; }
+        public virtual DbSet Residents { get; set; }
+        public virtual DbSet Users { get; set; }
+
+        protected override void OnModelCreating(DbModelBuilder modelBuilder)
+        {
+            modelBuilder.Entity()
+                .Property(e => e.Size)
+                .HasPrecision(18, 0);
+
+            modelBuilder.Entity()
+                .Property(e => e.MonthlyCharge)
+                .IsFixedLength();
+
+            modelBuilder.Entity()
+                .Property(e => e.Address)
+                .IsFixedLength();
+
+            modelBuilder.Entity()
+                .HasMany(e => e.Defects)
+                .WithRequired(e => e.Apartment)
+                .HasForeignKey(e => e.ApartmentNr)
+                .WillCascadeOnDelete(false);
+
+            modelBuilder.Entity()
+                .HasMany(e => e.Residents)
+                .WithRequired(e => e.Apartment)
+                .HasForeignKey(e => e.ApartmentNr)
+                .WillCascadeOnDelete(false);
+
+            modelBuilder.Entity()
+                .HasOptional(e => e.User)
+                .WithRequired(e => e.Apartment);
+
+            modelBuilder.Entity()
+                .Property(e => e.Name)
+                .IsFixedLength();
+
+            modelBuilder.Entity()
+                .Property(e => e.Description)
+                .IsUnicode(false);
+
+            modelBuilder.Entity()
+                .Property(e => e.Comment)
+                .IsUnicode(false);
+
+            modelBuilder.Entity()
+                .Property(e => e.Status)
+                .IsFixedLength();
+
+            modelBuilder.Entity()
+                .Property(e => e.ApartmentNr)
+                .IsFixedLength();
+
+            modelBuilder.Entity()
+                .Property(e => e.FirstName)
+                .IsFixedLength();
+
+            modelBuilder.Entity()
+                .Property(e => e.LastName)
+                .IsFixedLength();
+
+            modelBuilder.Entity()
+                .Property(e => e.Email)
+                .IsFixedLength();
+
+            modelBuilder.Entity()
+                .Property(e => e.Username)
+                .IsFixedLength();
+
+            modelBuilder.Entity()
+                .Property(e => e.Password)
+                .IsFixedLength();
+
+            modelBuilder.Entity()
+                .Property(e => e.FirstName)
+                .IsFixedLength();
+
+            modelBuilder.Entity()
+                .Property(e => e.LastName)
+                .IsFixedLength();
+
+            modelBuilder.Entity()
+                .Property(e => e.Phone)
+                .IsFixedLength();
+
+            modelBuilder.Entity()
+                .Property(e => e.Email)
+                .IsFixedLength();
+
+            modelBuilder.Entity()
+                .Property(e => e.SecondName)
+                .IsFixedLength();
+
+            modelBuilder.Entity()
+                .Property(e => e.SecondLastName)
+                .IsFixedLength();
+
+            modelBuilder.Entity()
+                .Property(e => e.SecondEmail)
+                .IsFixedLength();
+        }
+    }
+}
diff --git a/ApartmentManager/HousingWebApi/Models/Apartment.cs b/ApartmentManager/HousingWebApi/Models/Apartment.cs
new file mode 100644
index 0000000..16d884d
--- /dev/null
+++ b/ApartmentManager/HousingWebApi/Models/Apartment.cs
@@ -0,0 +1,42 @@
+namespace HousingWebApi
+{
+    using System;
+    using System.Collections.Generic;
+    using System.ComponentModel.DataAnnotations;
+    using System.ComponentModel.DataAnnotations.Schema;
+    using System.Data.Entity.Spatial;
+
+    public partial class Apartment
+    {
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
+        public Apartment()
+        {
+            Defects = new HashSet();
+            Residents = new HashSet();
+        }
+
+        [Key]
+        [DatabaseGenerated(DatabaseGeneratedOption.None)]
+        public int ApartmentNumber { get; set; }
+
+        public decimal Size { get; set; }
+
+        public int NumberOfRooms { get; set; }
+
+        [StringLength(10)]
+        public string MonthlyCharge { get; set; }
+
+        public int? Floor { get; set; }
+
+        [StringLength(50)]
+        public string Address { get; set; }
+
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+        public virtual ICollection Defects { get; set; }
+
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+        public virtual ICollection Residents { get; set; }
+
+        public virtual User User { get; set; }
+    }
+}
diff --git a/ApartmentManager/HousingWebApi/Models/Defect.cs b/ApartmentManager/HousingWebApi/Models/Defect.cs
new file mode 100644
index 0000000..4336393
--- /dev/null
+++ b/ApartmentManager/HousingWebApi/Models/Defect.cs
@@ -0,0 +1,46 @@
+namespace HousingWebApi
+{
+    using System;
+    using System.Collections.Generic;
+    using System.ComponentModel.DataAnnotations;
+    using System.ComponentModel.DataAnnotations.Schema;
+    using System.Data.Entity.Spatial;
+
+    public partial class Defect
+    {
+        [Key]
+        [DatabaseGenerated(DatabaseGeneratedOption.None)]
+        public int DefectNumber { get; set; }
+
+        public int ApartmentNr { get; set; }
+
+        [Required]
+        [StringLength(50)]
+        public string Name { get; set; }
+
+        [Column(TypeName = "date")]
+        public DateTime DateUploaded { get; set; }
+
+        [Column(TypeName = "image")]
+        [Required]
+        public byte[] Picture { get; set; }
+
+        [Column(TypeName = "image")]
+        public byte[] Picture2 { get; set; }
+
+        [Column(TypeName = "image")]
+        public byte[] Picture3 { get; set; }
+
+        [Column(TypeName = "text")]
+        [Required]
+        public string Description { get; set; }
+
+        [Column(TypeName = "text")]
+        public string Comment { get; set; }
+
+        [StringLength(10)]
+        public string Status { get; set; }
+
+        public virtual Apartment Apartment { get; set; }
+    }
+}
diff --git a/ApartmentManager/HousingWebApi/Models/PastContractOwner.cs b/ApartmentManager/HousingWebApi/Models/PastContractOwner.cs
new file mode 100644
index 0000000..273952a
--- /dev/null
+++ b/ApartmentManager/HousingWebApi/Models/PastContractOwner.cs
@@ -0,0 +1,17 @@
+namespace HousingWebApi
+{
+    using System;
+    using System.Collections.Generic;
+    using System.ComponentModel.DataAnnotations;
+    using System.ComponentModel.DataAnnotations.Schema;
+    using System.Data.Entity.Spatial;
+
+    public partial class PastContractOwner
+    {
+        [DatabaseGenerated(DatabaseGeneratedOption.None)]
+        public int Id { get; set; }
+
+        [StringLength(10)]
+        public string ApartmentNr { get; set; }
+    }
+}
diff --git a/ApartmentManager/HousingWebApi/Models/Resident.cs b/ApartmentManager/HousingWebApi/Models/Resident.cs
new file mode 100644
index 0000000..367631c
--- /dev/null
+++ b/ApartmentManager/HousingWebApi/Models/Resident.cs
@@ -0,0 +1,38 @@
+namespace HousingWebApi
+{
+    using System;
+    using System.Collections.Generic;
+    using System.ComponentModel.DataAnnotations;
+    using System.ComponentModel.DataAnnotations.Schema;
+    using System.Data.Entity.Spatial;
+
+    public partial class Resident
+    {
+        [Key]
+        [DatabaseGenerated(DatabaseGeneratedOption.None)]
+        public int ResidentNr { get; set; }
+
+        public int ApartmentNr { get; set; }
+
+        [Required]
+        [StringLength(15)]
+        public string FirstName { get; set; }
+
+        [Required]
+        [StringLength(15)]
+        public string LastName { get; set; }
+
+        [Column(TypeName = "date")]
+        public DateTime? BirthDate { get; set; }
+
+        public int? Phone { get; set; }
+
+        [StringLength(26)]
+        public string Email { get; set; }
+
+        [Column(TypeName = "image")]
+        public byte[] Picture { get; set; }
+
+        public virtual Apartment Apartment { get; set; }
+    }
+}
diff --git a/ApartmentManager/HousingWebApi/Models/User.cs b/ApartmentManager/HousingWebApi/Models/User.cs
new file mode 100644
index 0000000..bce5318
--- /dev/null
+++ b/ApartmentManager/HousingWebApi/Models/User.cs
@@ -0,0 +1,59 @@
+namespace HousingWebApi
+{
+    using System;
+    using System.Collections.Generic;
+    using System.ComponentModel.DataAnnotations;
+    using System.ComponentModel.DataAnnotations.Schema;
+    using System.Data.Entity.Spatial;
+
+    public partial class User
+    {
+        [Required]
+        [StringLength(15)]
+        public string Username { get; set; }
+
+        [Required]
+        [StringLength(15)]
+        public string Password { get; set; }
+
+        [Required]
+        [StringLength(15)]
+        public string FirstName { get; set; }
+
+        [Required]
+        [StringLength(15)]
+        public string LastName { get; set; }
+
+        [Column(TypeName = "date")]
+        public DateTime? BirthDate { get; set; }
+
+        [StringLength(12)]
+        public string Phone { get; set; }
+
+        [StringLength(26)]
+        public string Email { get; set; }
+
+        [Column(TypeName = "image")]
+        public byte[] Picture { get; set; }
+
+        [Key]
+        [DatabaseGenerated(DatabaseGeneratedOption.None)]
+        public int ApartmentNr { get; set; }
+
+        [StringLength(20)]
+        public string SecondName { get; set; }
+
+        [StringLength(20)]
+        public string SecondLastName { get; set; }
+
+        [Column(TypeName = "date")]
+        public DateTime? SecondBirthDate { get; set; }
+
+        public int? SecondPhone { get; set; }
+
+        [StringLength(25)]
+        public string SecondEmail { get; set; }
+
+        public virtual Apartment Apartment { get; set; }
+    }
+}
diff --git a/HousingDatabase.ldf b/HousingDatabase.ldf
index 234d695..74f90f3 100644
Binary files a/HousingDatabase.ldf and b/HousingDatabase.ldf differ
diff --git a/HousingDatabase.mdf b/HousingDatabase.mdf
index 3a64fee..5bb864c 100644
Binary files a/HousingDatabase.mdf and b/HousingDatabase.mdf differ
-- 
cgit v1.2.3