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}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(Performance) = preSolution
|
||||
HasPerformanceSessions = true
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|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
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace NetrunnerChallenge
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace NetrunnerChallenge.Data
|
||||
{
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using WebGrease.Css.Extensions;
|
||||
|
||||
namespace NetrunnerChallenge.Extensions
|
||||
|
||||
@@ -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()
|
||||
{
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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[]
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user