Fix view models namespaces issues. Remove unnecessary design time ordering context provider
This commit is contained in:
parent
226c03b573
commit
04c90f09f9
@ -1,4 +1,4 @@
|
|||||||
@model Identity.API.Models.AccountViewModels.LoggedOutViewModel
|
@model Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels.LoggedOutViewModel
|
||||||
|
|
||||||
<div class="container page-header">
|
<div class="container page-header">
|
||||||
<h1>
|
<h1>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
@using System.Collections.Generic
|
@using System.Collections.Generic
|
||||||
@using Microsoft.AspNetCore.Http
|
@using Microsoft.AspNetCore.Http
|
||||||
@using Microsoft.AspNetCore.Http.Authentication
|
@using Microsoft.AspNetCore.Http.Authentication
|
||||||
@model Identity.API.Models.AccountViewModels.LoginViewModel
|
@model Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels.LoginViewModel
|
||||||
|
|
||||||
|
|
||||||
@{
|
@{
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
@model Identity.API.Models.AccountViewModels.LogoutViewModel
|
@model Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels.LogoutViewModel
|
||||||
|
|
||||||
<div class="container logout-page">
|
<div class="container logout-page">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
@using Identity.API.Models.AccountViewModels
|
@model Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels.RegisterViewModel
|
||||||
@model RegisterViewModel
|
|
||||||
@{
|
@{
|
||||||
ViewData["Title"] = "Register";
|
ViewData["Title"] = "Register";
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
@model Identity.API.Models.AccountViewModels.ConsentViewModel
|
@model Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels.ConsentViewModel
|
||||||
|
|
||||||
<div class="container page-consent">
|
<div class="container page-consent">
|
||||||
<div class="row page-header">
|
<div class="row page-header">
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
@model Identity.API.Models.AccountViewModels.ScopeViewModel
|
@model Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels.ScopeViewModel
|
||||||
|
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<label>
|
<label>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
@model IdentityServer4.Quickstart.UI.Models.ErrorViewModel
|
@model Microsoft.eShopOnContainers.Services.Identity.API.Models.ErrorViewModel
|
||||||
|
|
||||||
@{
|
@{
|
||||||
var error = Model?.Error?.Error;
|
var error = Model?.Error?.Error;
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
using MediatR;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Design;
|
|
||||||
using Microsoft.eShopOnContainers.Services.Ordering.Infrastructure;
|
|
||||||
using Microsoft.Extensions.Configuration;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace Microsoft.eShopOnContainers.Services.Ordering.API.Infrastructure
|
|
||||||
{
|
|
||||||
public class OrderingDbContextDesigner : IDesignTimeDbContextFactory<OrderingContext>
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
public OrderingContext CreateDbContext(string[] args)
|
|
||||||
{
|
|
||||||
var options = new DbContextOptionsBuilder<OrderingContext>();
|
|
||||||
options.UseSqlServer("Server=tcp:127.0.0.1,5433;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word;",
|
|
||||||
sqlServerOptionsAction: sqlOptions =>
|
|
||||||
{
|
|
||||||
sqlOptions.MigrationsAssembly(typeof(Startup).GetTypeInfo().Assembly.GetName().Name);
|
|
||||||
});
|
|
||||||
return OrderingContext.CreateForEFDesignTools(options.Options);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@ -31,15 +31,9 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.Infrastructure
|
|||||||
|
|
||||||
private readonly IMediator _mediator;
|
private readonly IMediator _mediator;
|
||||||
|
|
||||||
|
private OrderingContext(DbContextOptions<OrderingContext> options) : base (options) { }
|
||||||
public static OrderingContext CreateForEFDesignTools(DbContextOptions options)
|
|
||||||
{
|
|
||||||
return new OrderingContext(options);
|
|
||||||
}
|
|
||||||
|
|
||||||
private OrderingContext(DbContextOptions options) : base (options) { }
|
public OrderingContext(DbContextOptions<OrderingContext> options, IMediator mediator) : base(options)
|
||||||
|
|
||||||
public OrderingContext(DbContextOptions options, IMediator mediator) : base(options)
|
|
||||||
{
|
{
|
||||||
_mediator = mediator ?? throw new ArgumentNullException(nameof(mediator));
|
_mediator = mediator ?? throw new ArgumentNullException(nameof(mediator));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user