lab-3 it is finish
This commit is contained in:
parent
6d197bee0c
commit
51c263ca23
@ -12,7 +12,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
namespace BlacksmithWorkshopDatabaseImplement.Migrations
|
||||
{
|
||||
[DbContext(typeof(BlacksmithWorkshopDataBase))]
|
||||
[Migration("20240324164611_InitialCreate")]
|
||||
[Migration("20240325174141_InitialCreate")]
|
||||
partial class InitialCreate
|
||||
{
|
||||
/// <inheritdoc />
|
@ -25,9 +25,9 @@ namespace BlacksmithWorkshopDatabaseImplement.Models
|
||||
public DateTime? DateImplement { get; private set; }
|
||||
[Required]
|
||||
public int ManufactureId { get; private set; }
|
||||
public virtual Manufacture Manufacture { get; set; } = new();
|
||||
public virtual Manufacture? Manufacture { get; set; }
|
||||
|
||||
public static Order? Create(OrderBindingModel model)
|
||||
public static Order Create(OrderBindingModel model)
|
||||
{
|
||||
return new Order()
|
||||
{
|
||||
@ -52,7 +52,7 @@ namespace BlacksmithWorkshopDatabaseImplement.Models
|
||||
public OrderViewModel GetViewModel => new()
|
||||
{
|
||||
ManufactureId = ManufactureId,
|
||||
ManufactureName = Manufacture.ManufactureName,
|
||||
ManufactureName = Manufacture?.ManufactureName ?? string.Empty,
|
||||
Count = Count,
|
||||
Sum = Sum,
|
||||
Status = Status,
|
||||
|
Loading…
Reference in New Issue
Block a user