various optimizations
This commit is contained in:
@@ -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}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetrunnerChallenge", "src\NetrunnerChallenge\NetrunnerChallenge.csproj", "{7CA56BAF-0A0F-4358-83CE-02D842913465}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
|
GlobalSection(Performance) = preSolution
|
||||||
|
HasPerformanceSessions = true
|
||||||
|
EndGlobalSection
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
Release|Any CPU = Release|Any CPU
|
Release|Any CPU = Release|Any CPU
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.Web;
|
using System.Web.Optimization;
|
||||||
using System.Web.Optimization;
|
|
||||||
|
|
||||||
namespace NetrunnerChallenge
|
namespace NetrunnerChallenge
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.Web;
|
using System.Web.Mvc;
|
||||||
using System.Web.Mvc;
|
|
||||||
|
|
||||||
namespace NetrunnerChallenge
|
namespace NetrunnerChallenge
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
using System;
|
using System.Web.Mvc;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Web;
|
|
||||||
using System.Web.Mvc;
|
|
||||||
using System.Web.Routing;
|
using System.Web.Routing;
|
||||||
|
|
||||||
namespace NetrunnerChallenge
|
namespace NetrunnerChallenge
|
||||||
|
|||||||
@@ -3,13 +3,11 @@ using System.Collections.Concurrent;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data.Entity;
|
using System.Data.Entity;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
|
||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
using NetrunnerChallenge.Data;
|
using NetrunnerChallenge.Data;
|
||||||
using NetrunnerChallenge.Extensions;
|
using NetrunnerChallenge.Extensions;
|
||||||
using NetrunnerChallenge.Models;
|
using NetrunnerChallenge.Models;
|
||||||
using NetrunnerDb.Net.Responses;
|
using NetrunnerDb.Net.Responses;
|
||||||
using Newtonsoft.Json;
|
|
||||||
|
|
||||||
namespace NetrunnerChallenge.Controllers
|
namespace NetrunnerChallenge.Controllers
|
||||||
{
|
{
|
||||||
@@ -53,15 +51,8 @@ namespace NetrunnerChallenge.Controllers
|
|||||||
cards.Add(new NetrunnerApi().GetCard(a.Code).First());
|
cards.Add(new NetrunnerApi().GetCard(a.Code).First());
|
||||||
});
|
});
|
||||||
var viewModel = new ChallengeResultViewModel {Cards = cards, Challenge = challege};
|
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);
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
using NetrunnerChallenge.Models;
|
using System.Data.Entity;
|
||||||
using System;
|
using NetrunnerChallenge.Models;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Data.Entity;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Web;
|
|
||||||
|
|
||||||
namespace NetrunnerChallenge.Data
|
namespace NetrunnerChallenge.Data
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
|
||||||
|
|
||||||
namespace NetrunnerChallenge.Data
|
namespace NetrunnerChallenge.Data
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
|
||||||
using WebGrease.Css.Extensions;
|
using WebGrease.Css.Extensions;
|
||||||
|
|
||||||
namespace NetrunnerChallenge.Extensions
|
namespace NetrunnerChallenge.Extensions
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
using System;
|
using System.Web;
|
||||||
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.Optimization;
|
||||||
using System.Web.Routing;
|
using System.Web.Routing;
|
||||||
@@ -9,7 +6,7 @@ using NetrunnerChallenge.Data;
|
|||||||
|
|
||||||
namespace NetrunnerChallenge
|
namespace NetrunnerChallenge
|
||||||
{
|
{
|
||||||
public class MvcApplication : System.Web.HttpApplication
|
public class MvcApplication : HttpApplication
|
||||||
{
|
{
|
||||||
protected void Application_Start()
|
protected void Application_Start()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
// <auto-generated />
|
// <auto-generated />
|
||||||
|
|
||||||
|
using System.CodeDom.Compiler;
|
||||||
|
using System.Data.Entity.Migrations.Infrastructure;
|
||||||
|
using System.Resources;
|
||||||
|
|
||||||
namespace NetrunnerChallenge.Migrations
|
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")]
|
[GeneratedCode("EntityFramework.Migrations", "6.1.3-40302")]
|
||||||
public sealed partial class _1 : IMigrationMetadata
|
public sealed partial class _1 : IMigrationMetadata
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
|
using System.Data.Entity.Migrations;
|
||||||
|
|
||||||
namespace NetrunnerChallenge.Migrations
|
namespace NetrunnerChallenge.Migrations
|
||||||
{
|
{
|
||||||
using System;
|
|
||||||
using System.Data.Entity.Migrations;
|
|
||||||
|
|
||||||
public partial class _1 : DbMigration
|
public partial class _1 : DbMigration
|
||||||
{
|
{
|
||||||
public override void Up()
|
public override void Up()
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
// <auto-generated />
|
// <auto-generated />
|
||||||
|
|
||||||
|
using System.CodeDom.Compiler;
|
||||||
|
using System.Data.Entity.Migrations.Infrastructure;
|
||||||
|
using System.Resources;
|
||||||
|
|
||||||
namespace NetrunnerChallenge.Migrations
|
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")]
|
[GeneratedCode("EntityFramework.Migrations", "6.1.3-40302")]
|
||||||
public sealed partial class _2 : IMigrationMetadata
|
public sealed partial class _2 : IMigrationMetadata
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
|
using System.Data.Entity.Migrations;
|
||||||
|
|
||||||
namespace NetrunnerChallenge.Migrations
|
namespace NetrunnerChallenge.Migrations
|
||||||
{
|
{
|
||||||
using System;
|
|
||||||
using System.Data.Entity.Migrations;
|
|
||||||
|
|
||||||
public partial class _2 : DbMigration
|
public partial class _2 : DbMigration
|
||||||
{
|
{
|
||||||
public override void Up()
|
public override void Up()
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
// <auto-generated />
|
// <auto-generated />
|
||||||
|
|
||||||
|
using System.CodeDom.Compiler;
|
||||||
|
using System.Data.Entity.Migrations.Infrastructure;
|
||||||
|
using System.Resources;
|
||||||
|
|
||||||
namespace NetrunnerChallenge.Migrations
|
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")]
|
[GeneratedCode("EntityFramework.Migrations", "6.1.3-40302")]
|
||||||
public sealed partial class _3 : IMigrationMetadata
|
public sealed partial class _3 : IMigrationMetadata
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
|
using System.Data.Entity.Migrations;
|
||||||
|
|
||||||
namespace NetrunnerChallenge.Migrations
|
namespace NetrunnerChallenge.Migrations
|
||||||
{
|
{
|
||||||
using System;
|
|
||||||
using System.Data.Entity.Migrations;
|
|
||||||
|
|
||||||
public partial class _3 : DbMigration
|
public partial class _3 : DbMigration
|
||||||
{
|
{
|
||||||
public override void Up()
|
public override void Up()
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
// <auto-generated />
|
// <auto-generated />
|
||||||
|
|
||||||
|
using System.CodeDom.Compiler;
|
||||||
|
using System.Data.Entity.Migrations.Infrastructure;
|
||||||
|
using System.Resources;
|
||||||
|
|
||||||
namespace NetrunnerChallenge.Migrations
|
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")]
|
[GeneratedCode("EntityFramework.Migrations", "6.1.2-31219")]
|
||||||
public sealed partial class _4 : IMigrationMetadata
|
public sealed partial class _4 : IMigrationMetadata
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,11 +1,7 @@
|
|||||||
using System.Linq;
|
using System.Data.Entity.Migrations;
|
||||||
using NetrunnerChallenge.Data;
|
|
||||||
|
|
||||||
namespace NetrunnerChallenge.Migrations
|
namespace NetrunnerChallenge.Migrations
|
||||||
{
|
{
|
||||||
using System;
|
|
||||||
using System.Data.Entity.Migrations;
|
|
||||||
|
|
||||||
public partial class _4 : DbMigration
|
public partial class _4 : DbMigration
|
||||||
{
|
{
|
||||||
public override void Up()
|
public override void Up()
|
||||||
|
|||||||
@@ -1,20 +1,17 @@
|
|||||||
|
using System.Data.Entity.Migrations;
|
||||||
|
using NetrunnerChallenge.Data;
|
||||||
using NetrunnerChallenge.Models;
|
using NetrunnerChallenge.Models;
|
||||||
|
|
||||||
namespace NetrunnerChallenge.Migrations
|
namespace NetrunnerChallenge.Migrations
|
||||||
{
|
{
|
||||||
using System;
|
internal sealed class Configuration : DbMigrationsConfiguration<DatabaseContext>
|
||||||
using System.Data.Entity;
|
|
||||||
using System.Data.Entity.Migrations;
|
|
||||||
using System.Linq;
|
|
||||||
|
|
||||||
internal sealed class Configuration : DbMigrationsConfiguration<NetrunnerChallenge.Data.DatabaseContext>
|
|
||||||
{
|
{
|
||||||
public Configuration()
|
public Configuration()
|
||||||
{
|
{
|
||||||
AutomaticMigrationsEnabled = true;
|
AutomaticMigrationsEnabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Seed(NetrunnerChallenge.Data.DatabaseContext context)
|
protected override void Seed(DatabaseContext context)
|
||||||
{
|
{
|
||||||
context.FactionsDb.AddOrUpdate(new Faction[]
|
context.FactionsDb.AddOrUpdate(new Faction[]
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ using System.Collections.Generic;
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
|
||||||
using NetrunnerChallenge.Extensions;
|
using NetrunnerChallenge.Extensions;
|
||||||
|
|
||||||
namespace NetrunnerChallenge.Models
|
namespace NetrunnerChallenge.Models
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
using System;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Web;
|
|
||||||
|
|
||||||
namespace NetrunnerChallenge.Models
|
namespace NetrunnerChallenge.Models
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Web;
|
|
||||||
using NetrunnerDb.Net.Responses;
|
using NetrunnerDb.Net.Responses;
|
||||||
|
|
||||||
namespace NetrunnerChallenge.Models
|
namespace NetrunnerChallenge.Models
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
using System;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Web;
|
|
||||||
|
|
||||||
namespace NetrunnerChallenge.Models
|
namespace NetrunnerChallenge.Models
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
// General Information about an assembly is controlled through the following
|
||||||
|
|||||||
Reference in New Issue
Block a user