PIbd-21 Yaruskin S.A. LabWork07_Base #15

Closed
Salikh wants to merge 9 commits from lab7 into lab6
Showing only changes of commit c932df1c72 - Show all commits

View File

@ -9,35 +9,35 @@ namespace MotorPlantDatabaseImplement.Models
{
public class MessageInfo : IMessageInfoModel
{
[NotMapped]
public int Id { get; private set; }
[NotMapped]
public int Id { get; private set; }
[DataMember]
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
public string MessageId { get; set; } = string.Empty;
[DataMember]
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
public string MessageId { get; set; } = string.Empty;
[DataMember]
public int? ClientId { get; set; }
public int? ClientId { get; set; }
public virtual Client? Client { get; set; }
public virtual Client? Client { get; set; }
[DataMember]
[Required]
public string SenderName { get; set; } = string.Empty;
[DataMember]
[Required]
public string SenderName { get; set; } = string.Empty;
[DataMember]
[Required]
public DateTime DateDelivery { get; set; }
[DataMember]
[Required]
public DateTime DateDelivery { get; set; }
[Required]
public string Subject { get; set; } = string.Empty;
[DataMember]
[Required]
public string Subject { get; set; } = string.Empty;
[DataMember]
[Required]
public string Body { get; set; } = string.Empty;
[DataMember]
[Required]
public string Body { get; set; } = string.Empty;
public static MessageInfo? Create(MessageInfoBindingModel? model)
public static MessageInfo? Create(MessageInfoBindingModel? model)
{
if (model == null)
{