Готово2
This commit is contained in:
parent
538000e257
commit
8f116075d8
@ -12,7 +12,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|||||||
namespace CarRepairShopDatabaseImplement.Migrations
|
namespace CarRepairShopDatabaseImplement.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(RepairsShopDatabase))]
|
[DbContext(typeof(RepairsShopDatabase))]
|
||||||
[Migration("20240325165319_InitialCreate")]
|
[Migration("20240325180251_InitialCreate")]
|
||||||
partial class InitialCreate
|
partial class InitialCreate
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
@ -19,7 +19,7 @@ namespace CarRepairShopDatabaseImplement.Models
|
|||||||
public DateTime? DateImplement { get; private set; }
|
public DateTime? DateImplement { get; private set; }
|
||||||
[Required]
|
[Required]
|
||||||
public int RepairId { get; private set; }
|
public int RepairId { get; private set; }
|
||||||
public virtual Repair Repair { get; set; } = new();
|
public virtual Repair? Repair { get; set; }
|
||||||
|
|
||||||
public static Order? Create(OrderBindingModel model)
|
public static Order? Create(OrderBindingModel model)
|
||||||
{
|
{
|
||||||
@ -48,7 +48,7 @@ namespace CarRepairShopDatabaseImplement.Models
|
|||||||
public OrderViewModel GetViewModel => new()
|
public OrderViewModel GetViewModel => new()
|
||||||
{
|
{
|
||||||
RepairId = RepairId,
|
RepairId = RepairId,
|
||||||
RepairName = Repair.RepairName,
|
RepairName = Repair?.RepairName ?? string.Empty,
|
||||||
Count = Count,
|
Count = Count,
|
||||||
Sum = Sum,
|
Sum = Sum,
|
||||||
Status = Status,
|
Status = Status,
|
||||||
|
Loading…
Reference in New Issue
Block a user