|
@ -9,6 +9,7 @@ using Sevomin.Models.Repositories; |
|
|
using Microsoft.AspNet.Identity; |
|
|
using Microsoft.AspNet.Identity; |
|
|
using Microsoft.AspNet.Identity.EntityFramework; |
|
|
using Microsoft.AspNet.Identity.EntityFramework; |
|
|
using Sevomin.Models.Helpers; |
|
|
using Sevomin.Models.Helpers; |
|
|
|
|
|
using System.Web; |
|
|
|
|
|
|
|
|
namespace Sevomin.WebFrontend.Controllers |
|
|
namespace Sevomin.WebFrontend.Controllers |
|
|
{ |
|
|
{ |
|
@ -16,16 +17,25 @@ namespace Sevomin.WebFrontend.Controllers |
|
|
{ |
|
|
{ |
|
|
IJobRepository _JobRepository; |
|
|
IJobRepository _JobRepository; |
|
|
public SevominUserManager UserManager { get; private set; } |
|
|
public SevominUserManager UserManager { get; private set; } |
|
|
|
|
|
private HttpContextBase _httpContext; |
|
|
|
|
|
|
|
|
public JobController() |
|
|
public JobController() |
|
|
: this(JobRepository.Current, new SevominUserManager(new UserStore<User>(SevominDbContext.Current))) |
|
|
|
|
|
|
|
|
: this(JobRepository.Current, |
|
|
|
|
|
new SevominUserManager(new UserStore<User>(SevominDbContext.Current)), null) |
|
|
{ |
|
|
{ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public JobController(IJobRepository jobRepository, SevominUserManager userManager) |
|
|
|
|
|
|
|
|
protected override void Initialize(System.Web.Routing.RequestContext requestContext) |
|
|
|
|
|
{ |
|
|
|
|
|
base.Initialize(requestContext); |
|
|
|
|
|
_httpContext = requestContext.HttpContext; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public JobController(IJobRepository jobRepository, SevominUserManager userManager, HttpContextBase httpContext) |
|
|
{ |
|
|
{ |
|
|
_JobRepository = jobRepository; |
|
|
_JobRepository = jobRepository; |
|
|
UserManager = userManager; |
|
|
UserManager = userManager; |
|
|
|
|
|
_httpContext = httpContext; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public async Task<ActionResult> NewJob() |
|
|
public async Task<ActionResult> NewJob() |
|
|