diff --git a/02. ASP.NET MVC Essentials/.nuget/NuGet.Config b/02. ASP.NET MVC Essentials/.nuget/NuGet.Config
new file mode 100644
index 0000000..67f8ea0
--- /dev/null
+++ b/02. ASP.NET MVC Essentials/.nuget/NuGet.Config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/02. ASP.NET MVC Essentials/.nuget/NuGet.exe b/02. ASP.NET MVC Essentials/.nuget/NuGet.exe
new file mode 100644
index 0000000..324daa8
Binary files /dev/null and b/02. ASP.NET MVC Essentials/.nuget/NuGet.exe differ
diff --git a/02. ASP.NET MVC Essentials/.nuget/NuGet.targets b/02. ASP.NET MVC Essentials/.nuget/NuGet.targets
new file mode 100644
index 0000000..3f8c37b
--- /dev/null
+++ b/02. ASP.NET MVC Essentials/.nuget/NuGet.targets
@@ -0,0 +1,144 @@
+
+
+
+ $(MSBuildProjectDirectory)\..\
+
+
+ false
+
+
+ false
+
+
+ true
+
+
+ false
+
+
+
+
+
+
+
+
+
+
+ $([System.IO.Path]::Combine($(SolutionDir), ".nuget"))
+
+
+
+
+ $(SolutionDir).nuget
+
+
+
+ $(MSBuildProjectDirectory)\packages.$(MSBuildProjectName.Replace(' ', '_')).config
+ $(MSBuildProjectDirectory)\packages.$(MSBuildProjectName).config
+
+
+
+ $(MSBuildProjectDirectory)\packages.config
+ $(PackagesProjectConfig)
+
+
+
+
+ $(NuGetToolsPath)\NuGet.exe
+ @(PackageSource)
+
+ "$(NuGetExePath)"
+ mono --runtime=v4.0.30319 "$(NuGetExePath)"
+
+ $(TargetDir.Trim('\\'))
+
+ -RequireConsent
+ -NonInteractive
+
+ "$(SolutionDir) "
+ "$(SolutionDir)"
+
+
+ $(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir)
+ $(NuGetCommand) pack "$(ProjectPath)" -Properties "Configuration=$(Configuration);Platform=$(Platform)" $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols
+
+
+
+ RestorePackages;
+ $(BuildDependsOn);
+
+
+
+
+ $(BuildDependsOn);
+ BuildPackage;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/App_Start/AccessControlAllowOrigin.cs b/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/App_Start/AccessControlAllowOrigin.cs
index a07463e..bdf69a2 100644
--- a/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/App_Start/AccessControlAllowOrigin.cs
+++ b/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/App_Start/AccessControlAllowOrigin.cs
@@ -1,10 +1,6 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web;
-using System.Web.Mvc;
+using System.Web.Mvc;
-namespace WebApplicationMvcGlimpse.App_Start
+namespace WebApplicationMvcGlimpse
{
public class AccessControlAllowOrigin : ActionFilterAttribute
{
diff --git a/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/App_Start/BundleConfig.cs b/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/App_Start/BundleConfig.cs
index 60d946f..23b8ac1 100644
--- a/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/App_Start/BundleConfig.cs
+++ b/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/App_Start/BundleConfig.cs
@@ -1,5 +1,4 @@
-using System.Web;
-using System.Web.Optimization;
+using System.Web.Optimization;
namespace WebApplicationMvcGlimpse
{
diff --git a/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/App_Start/FilterConfig.cs b/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/App_Start/FilterConfig.cs
index bc4358a..3aed7a0 100644
--- a/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/App_Start/FilterConfig.cs
+++ b/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/App_Start/FilterConfig.cs
@@ -1,6 +1,4 @@
-using System.Web;
-using System.Web.Mvc;
-using WebApplicationMvcGlimpse.App_Start;
+using System.Web.Mvc;
namespace WebApplicationMvcGlimpse
{
diff --git a/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/App_Start/LogAttribute.cs b/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/App_Start/LogAttribute.cs
index 622b695..878cac7 100644
--- a/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/App_Start/LogAttribute.cs
+++ b/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/App_Start/LogAttribute.cs
@@ -1,11 +1,7 @@
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
-using System.Web;
+using System.Diagnostics;
using System.Web.Mvc;
-namespace WebApplicationMvcGlimpse.App_Start
+namespace WebApplicationMvcGlimpse
{
public class LogAttribute : ActionFilterAttribute
{
diff --git a/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/App_Start/RouteConfig.cs b/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/App_Start/RouteConfig.cs
index 6497357..dd947e6 100644
--- a/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/App_Start/RouteConfig.cs
+++ b/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/App_Start/RouteConfig.cs
@@ -1,8 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web;
-using System.Web.Mvc;
+using System.Web.Mvc;
using System.Web.Routing;
namespace WebApplicationMvcGlimpse
diff --git a/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/Areas/Administration/Controllers/UsersController.cs b/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/Areas/Administration/Controllers/UsersController.cs
index 9f17f50..a00bbd3 100644
--- a/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/Areas/Administration/Controllers/UsersController.cs
+++ b/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/Areas/Administration/Controllers/UsersController.cs
@@ -1,8 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web;
-using System.Web.Mvc;
+using System.Web.Mvc;
using WebApplicationMvcGlimpse.Controllers;
namespace WebApplicationMvcGlimpse.Areas.Administration.Controllers
diff --git a/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/Controllers/AccountController.cs b/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/Controllers/AccountController.cs
index 12daeab..96b39c6 100644
--- a/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/Controllers/AccountController.cs
+++ b/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/Controllers/AccountController.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Collections.Generic;
+using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
using System.Threading.Tasks;
diff --git a/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/Controllers/AdminController.cs b/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/Controllers/AdminController.cs
index 2ef6875..da05551 100644
--- a/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/Controllers/AdminController.cs
+++ b/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/Controllers/AdminController.cs
@@ -1,8 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web;
-using System.Web.Mvc;
+using System.Web.Mvc;
namespace WebApplicationMvcGlimpse.Controllers
{
diff --git a/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/Controllers/HomeController.cs b/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/Controllers/HomeController.cs
index fd3345a..eefcba3 100644
--- a/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/Controllers/HomeController.cs
+++ b/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/Controllers/HomeController.cs
@@ -1,8 +1,4 @@
using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
-using System.Web;
using System.Web.Mvc;
namespace WebApplicationMvcGlimpse.Controllers
@@ -36,19 +32,17 @@ public ActionResult Contact()
public ActionResult ReturnJSON()
{
- return this.Json(DateTime.Now, JsonRequestBehavior.AllowGet);
+ return Json(DateTime.Now, JsonRequestBehavior.AllowGet);
}
public ActionResult ReturnJS()
{
- return this.JavaScript("var a = 1;");
+ return JavaScript("var a = 1;");
}
public ActionResult ReturnFile()
{
return new HttpUnauthorizedResult();
-
- return this.File(@"C:\Temp\test.txt", "application/pdf", "file.pdf");
}
}
}
\ No newline at end of file
diff --git a/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/Controllers/UsersAdminController.cs b/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/Controllers/UsersAdminController.cs
index a959cc0..254c7d7 100644
--- a/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/Controllers/UsersAdminController.cs
+++ b/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/Controllers/UsersAdminController.cs
@@ -1,8 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web;
-using System.Web.Mvc;
+using System.Web.Mvc;
namespace WebApplicationMvcGlimpse.Controllers
{
diff --git a/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/Controllers/UsersController.cs b/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/Controllers/UsersController.cs
index 0b60d9d..265e7e2 100644
--- a/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/Controllers/UsersController.cs
+++ b/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/Controllers/UsersController.cs
@@ -1,11 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
-using System.Diagnostics;
-using System.Linq;
-using System.Web;
-using System.Web.Mvc;
-using WebApplicationMvcGlimpse.App_Start;
+using System.Web.Mvc;
namespace WebApplicationMvcGlimpse.Controllers
{
diff --git a/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/Global.asax.cs b/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/Global.asax.cs
index 09f41a1..247aa84 100644
--- a/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/Global.asax.cs
+++ b/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/Global.asax.cs
@@ -1,8 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web;
-using System.Web.Mvc;
+using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
diff --git a/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/Models/Product.cs b/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/Models/Product.cs
index c4a4379..df8d4cd 100644
--- a/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/Models/Product.cs
+++ b/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/Models/Product.cs
@@ -1,9 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web;
-
-namespace WebApplicationMvcGlimpse.Models
+namespace WebApplicationMvcGlimpse.Models
{
public class Product
{
diff --git a/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/Properties/AssemblyInfo.cs b/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/Properties/AssemblyInfo.cs
index 496fc28..4a188e6 100644
--- a/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/Properties/AssemblyInfo.cs
+++ b/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/Properties/AssemblyInfo.cs
@@ -1,5 +1,4 @@
using System.Reflection;
-using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
diff --git a/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/Views/Shared/_Layout.cshtml b/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/Views/Shared/_Layout.cshtml
index c937a17..43de080 100644
--- a/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/Views/Shared/_Layout.cshtml
+++ b/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/Views/Shared/_Layout.cshtml
@@ -23,7 +23,7 @@
@Html.ActionLink("Home", "Index", "Home")
@Html.ActionLink("About", "About", "Home")
@Html.ActionLink("Contact", "Contact", "Home")
- @if (this.ViewContext.RouteData.DataTokens["area"] == "Administration")
+ @if (ViewContext.RouteData.DataTokens["area"] == "Administration")
{
@Html.ActionLink("ViewAll", "ViewAll", "Users", new { area = "Administration" })
}
diff --git a/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/WebApplicationMvcGlimpse.csproj b/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/WebApplicationMvcGlimpse.csproj
index 3e54761..a2cafa8 100644
--- a/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/WebApplicationMvcGlimpse.csproj
+++ b/02. ASP.NET MVC Essentials/WebApplicationMvcGlimpse/WebApplicationMvcGlimpse.csproj
@@ -21,6 +21,8 @@
..\packages\WebGrease.1.5.2\lib
+ ..\
+ true
true
@@ -282,6 +284,13 @@
+
+
+
+ This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
+
+
+