Correct4
This commit is contained in:
parent
0d6af8477a
commit
97f1a44c76
@ -12,7 +12,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
namespace CarRepairShopDatabaseImplement.Migrations
|
||||
{
|
||||
[DbContext(typeof(RepairsShopDatabase))]
|
||||
[Migration("20240324163100_InitialCreate")]
|
||||
[Migration("20240325173603_InitialCreate")]
|
||||
partial class InitialCreate
|
||||
{
|
||||
/// <inheritdoc />
|
@ -19,7 +19,7 @@ namespace CarRepairShopDatabaseImplement.Models
|
||||
public DateTime? DateImplement { get; private set; }
|
||||
[Required]
|
||||
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)
|
||||
{
|
||||
@ -48,7 +48,7 @@ namespace CarRepairShopDatabaseImplement.Models
|
||||
public OrderViewModel GetViewModel => new()
|
||||
{
|
||||
RepairId = RepairId,
|
||||
RepairName = Repair.RepairName,
|
||||
RepairName = Repair?.RepairName ?? string.Empty,
|
||||
Count = Count,
|
||||
Sum = Sum,
|
||||
Status = Status,
|
||||
|
Loading…
Reference in New Issue
Block a user