various optimizations

This commit is contained in:
Tommy Parnell
2015-05-23 17:26:50 -04:00
parent c74a246ac1
commit 08fa1540c3
23 changed files with 45 additions and 90 deletions

View File

@@ -6,6 +6,9 @@ MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetrunnerChallenge", "src\NetrunnerChallenge\NetrunnerChallenge.csproj", "{7CA56BAF-0A0F-4358-83CE-02D842913465}"
EndProject
Global
GlobalSection(Performance) = preSolution
HasPerformanceSessions = true
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU

View File

@@ -1,5 +1,4 @@
using System.Web;
using System.Web.Optimization;
using System.Web.Optimization;
namespace NetrunnerChallenge
{

View File

@@ -1,5 +1,4 @@
using System.Web;
using System.Web.Mvc;
using System.Web.Mvc;
namespace NetrunnerChallenge
{

View File

@@ -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 NetrunnerChallenge

View File

@@ -3,13 +3,11 @@ using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using NetrunnerChallenge.Data;
using NetrunnerChallenge.Extensions;
using NetrunnerChallenge.Models;
using NetrunnerDb.Net.Responses;
using Newtonsoft.Json;
namespace NetrunnerChallenge.Controllers
{
@@ -53,15 +51,8 @@ namespace NetrunnerChallenge.Controllers
cards.Add(new NetrunnerApi().GetCard(a.Code).First());
});
var viewModel = new ChallengeResultViewModel {Cards = cards, Challenge = challege};
if (this.HttpContext.Request.IsAjaxRequest())
{
return PartialView("Challenge",viewModel);
}
else
{
return View("Challenge", viewModel);
}
return View("Challenge", viewModel);
}
}

View File

@@ -1,9 +1,5 @@
using NetrunnerChallenge.Models;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Web;
using System.Data.Entity;
using NetrunnerChallenge.Models;
namespace NetrunnerChallenge.Data
{

View File

@@ -1,7 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace NetrunnerChallenge.Data
{

View File

@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using WebGrease.Css.Extensions;
namespace NetrunnerChallenge.Extensions

View File

@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
@@ -9,7 +6,7 @@ using NetrunnerChallenge.Data;
namespace NetrunnerChallenge
{
public class MvcApplication : System.Web.HttpApplication
public class MvcApplication : HttpApplication
{
protected void Application_Start()
{

View File

@@ -1,11 +1,11 @@
// <auto-generated />
using System.CodeDom.Compiler;
using System.Data.Entity.Migrations.Infrastructure;
using System.Resources;
namespace NetrunnerChallenge.Migrations
{
using System.CodeDom.Compiler;
using System.Data.Entity.Migrations;
using System.Data.Entity.Migrations.Infrastructure;
using System.Resources;
[GeneratedCode("EntityFramework.Migrations", "6.1.3-40302")]
public sealed partial class _1 : IMigrationMetadata
{

View File

@@ -1,8 +1,7 @@
using System.Data.Entity.Migrations;
namespace NetrunnerChallenge.Migrations
{
using System;
using System.Data.Entity.Migrations;
public partial class _1 : DbMigration
{
public override void Up()

View File

@@ -1,11 +1,11 @@
// <auto-generated />
using System.CodeDom.Compiler;
using System.Data.Entity.Migrations.Infrastructure;
using System.Resources;
namespace NetrunnerChallenge.Migrations
{
using System.CodeDom.Compiler;
using System.Data.Entity.Migrations;
using System.Data.Entity.Migrations.Infrastructure;
using System.Resources;
[GeneratedCode("EntityFramework.Migrations", "6.1.3-40302")]
public sealed partial class _2 : IMigrationMetadata
{

View File

@@ -1,8 +1,7 @@
using System.Data.Entity.Migrations;
namespace NetrunnerChallenge.Migrations
{
using System;
using System.Data.Entity.Migrations;
public partial class _2 : DbMigration
{
public override void Up()

View File

@@ -1,11 +1,11 @@
// <auto-generated />
using System.CodeDom.Compiler;
using System.Data.Entity.Migrations.Infrastructure;
using System.Resources;
namespace NetrunnerChallenge.Migrations
{
using System.CodeDom.Compiler;
using System.Data.Entity.Migrations;
using System.Data.Entity.Migrations.Infrastructure;
using System.Resources;
[GeneratedCode("EntityFramework.Migrations", "6.1.3-40302")]
public sealed partial class _3 : IMigrationMetadata
{

View File

@@ -1,8 +1,7 @@
using System.Data.Entity.Migrations;
namespace NetrunnerChallenge.Migrations
{
using System;
using System.Data.Entity.Migrations;
public partial class _3 : DbMigration
{
public override void Up()

View File

@@ -1,11 +1,11 @@
// <auto-generated />
using System.CodeDom.Compiler;
using System.Data.Entity.Migrations.Infrastructure;
using System.Resources;
namespace NetrunnerChallenge.Migrations
{
using System.CodeDom.Compiler;
using System.Data.Entity.Migrations;
using System.Data.Entity.Migrations.Infrastructure;
using System.Resources;
[GeneratedCode("EntityFramework.Migrations", "6.1.2-31219")]
public sealed partial class _4 : IMigrationMetadata
{

View File

@@ -1,11 +1,7 @@
using System.Linq;
using NetrunnerChallenge.Data;
using System.Data.Entity.Migrations;
namespace NetrunnerChallenge.Migrations
{
using System;
using System.Data.Entity.Migrations;
public partial class _4 : DbMigration
{
public override void Up()

View File

@@ -1,20 +1,17 @@
using System.Data.Entity.Migrations;
using NetrunnerChallenge.Data;
using NetrunnerChallenge.Models;
namespace NetrunnerChallenge.Migrations
{
using System;
using System.Data.Entity;
using System.Data.Entity.Migrations;
using System.Linq;
internal sealed class Configuration : DbMigrationsConfiguration<NetrunnerChallenge.Data.DatabaseContext>
internal sealed class Configuration : DbMigrationsConfiguration<DatabaseContext>
{
public Configuration()
{
AutomaticMigrationsEnabled = true;
}
protected override void Seed(NetrunnerChallenge.Data.DatabaseContext context)
protected override void Seed(DatabaseContext context)
{
context.FactionsDb.AddOrUpdate(new Faction[]
{

View File

@@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Web;
using NetrunnerChallenge.Extensions;
namespace NetrunnerChallenge.Models

View File

@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
namespace NetrunnerChallenge.Models
{

View File

@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Collections.Generic;
using NetrunnerDb.Net.Responses;
namespace NetrunnerChallenge.Models

View File

@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
namespace NetrunnerChallenge.Models
{

View File

@@ -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