client fix

This commit is contained in:
Данияр Аглиуллов 2023-03-04 15:07:42 +04:00
parent 1bb8c060cb
commit e43157e3d7

View File

@ -4,6 +4,7 @@ using ConfectioneryDataModels;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
@ -23,6 +24,7 @@ namespace ConfectioneryDatabaseImplement.Models
public int Id { get; private set; } public int Id { get; private set; }
[ForeignKey("ClientId")]
public virtual List<Order> Orders { get; set; } = new(); public virtual List<Order> Orders { get; set; } = new();
public static Client? Create(ClientBindingModel model) public static Client? Create(ClientBindingModel model)