diff --git a/Bank/BankDatabaseImplement/Models/Operation.cs b/Bank/BankDatabaseImplement/Models/Operation.cs index b0356cb..fb70907 100644 --- a/Bank/BankDatabaseImplement/Models/Operation.cs +++ b/Bank/BankDatabaseImplement/Models/Operation.cs @@ -18,6 +18,7 @@ namespace BankDatabaseImplement.Models public int Sum { get; set; } [Required] public DateTime OperationTime { get; set; } + [Required] public int? SenderCardId { get; set; } = null; public virtual Card? SenderCard { get; private set; } [Required] diff --git a/Bank/BankDatabaseImplement/Models/Transfer.cs b/Bank/BankDatabaseImplement/Models/Transfer.cs index 04ec37e..1d23d35 100644 --- a/Bank/BankDatabaseImplement/Models/Transfer.cs +++ b/Bank/BankDatabaseImplement/Models/Transfer.cs @@ -22,12 +22,12 @@ namespace BankDatabaseImplement.Models public virtual Operation? Operation { get; set; } = null; [Required] public int SenderAccountId { get; set; } - public virtual Account? SenderAccount { get; set; } = null; - [Required] - public int RecipientAccountId { get; set; } - public virtual Account? RecipientAccount { get; set; } = null; + public virtual Account? SenderAccount { get; set; } + [Required] + public int RecipientAccountId { get; set; } + public virtual Account? RecipientAccount { get; set; } - public static Transfer? Create(TransferBindingModel model) + public static Transfer? Create(TransferBindingModel model) { if (model == null) return null; return new Transfer diff --git a/Bank/BankRestApi/BankRestApi.csproj b/Bank/BankRestApi/BankRestApi.csproj index 2d7c0b4..8dd10e9 100644 --- a/Bank/BankRestApi/BankRestApi.csproj +++ b/Bank/BankRestApi/BankRestApi.csproj @@ -7,6 +7,10 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive +